Results 1 to 9 of 9
I need to schedule a script through crontab file so that it runs every 14 days.
Can anyone tell me what should be the crontab entry for this?...
- 05-14-2009 #1Just Joined!
- Join Date
- May 2009
- Posts
- 8
Crontab entry to schedule a script every 14 days
I need to schedule a script through crontab file so that it runs every 14 days.
Can anyone tell me what should be the crontab entry for this?
- 05-14-2009 #2
what is crontab???
Dual Booting Ubuntu 10.04, Windows 7
Toshiba Satellite A200-1M5, Duo Core 2.0 Ghz, 1 Gigs RAM, 256 Intel Card
You are registered Linux user number 490788
Happy Linuxing
- 05-15-2009 #3Just Joined!
- Join Date
- Jan 2009
- Location
- colachel
- Posts
- 27
# m h dom mon dow command
* * */14 * * your script file
- 05-15-2009 #4
- 05-18-2009 #5Just Joined!
- Join Date
- May 2009
- Posts
- 8
I have tried with this command. It runs the script on 14th and 28th of every month,not after every 14 days
- 05-18-2009 #6
i see it the same there is sometimes a 1 day delay and some times it i s2 days,
Dual Booting Ubuntu 10.04, Windows 7
Toshiba Satellite A200-1M5, Duo Core 2.0 Ghz, 1 Gigs RAM, 256 Intel Card
You are registered Linux user number 490788
Happy Linuxing
- 05-20-2009 #7Just Joined!
- Join Date
- May 2009
- Posts
- 8
According to the requirement the schedule date should not be date specific i.e. on14th and 28th for example. It should run after every 14 days. I have tried with the above command. But it won't work as per requirement
- 05-20-2009 #8
I am currently learning shell scripting right now using book from Bible, it is awesome by the way, anyway, what I am going to say is that if you can make a script every day and inside make the 14 days check, so you have to save the last date in a file and every day it is checked if the current date minus the date in the file =14 then run the other script ( your desired script) and save the current date in the file and so on.
NOTE:I am new to shell scripting so I don't know how is this can be done...Dual Booting Ubuntu 10.04, Windows 7
Toshiba Satellite A200-1M5, Duo Core 2.0 Ghz, 1 Gigs RAM, 256 Intel Card
You are registered Linux user number 490788
Happy Linuxing
- 05-20-2009 #9
I wonder if it's even possible. I've done some Google searches and every time I see people telling others it's impossible. I think you should handle it in your own code and let cron call it every week (lets say day 1 of week, that's possible). I don't really know anything else.


Reply With Quote
