![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Scheduling bi-weekly through cron | LPT | UNIX for Advanced & Expert Users | 5 | 02-20-2009 11:45 AM |
| cron scheduling? | megh | HP-UX | 1 | 08-19-2008 02:27 PM |
| Problem with scheduling a shell script on cygwin using cron | shash | UNIX for Dummies Questions & Answers | 4 | 08-09-2007 06:08 PM |
| scheduling tasks with cron | alikun | UNIX for Dummies Questions & Answers | 4 | 03-21-2007 04:32 PM |
| cron job scheduling | shihabvk | UNIX for Advanced & Expert Users | 1 | 08-22-2005 10:36 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Cron job scheduling on the alternate day of the week
Hi,
Help please! I have to schedule some job on every Monday and alternate Thursday with Cron. I am not sure as if I pass 1 and 5 on the day filed, the job will be scheduled for every Monday and Thursday. How to schedule in job in above case. Thanks in anticipation. |
|
||||
|
|
|
||||
|
Hi Frank
Thanks for the link! However my problem is still open. From the given link --------------------------- 0 0 1-7 * 5 /some/script You might hope that will run /some/script during the first minute of the first Friday of the month. Unfortunately, it will run the script on each day of the first week of the month and on every Friday. ---------------------- In my case I have to schedule the job on every Monday and every alternate Thursday. If the write the below code 0 0 1-7 * 1,4 <path to script> Then above will run every Monday and Thursday, however I have to skip one week and then run the script in case of Thursday. Please help ! Regards |
|
|||||
|
well, it is possible, but your crontab lines get awfully long. Cron will only execute EVERY set day, there is no explicit way to tell it every Other set day, so you have to test whether it should run today or not, and in the simple, binary, case like this, the easiest (maybe quickest) solution is to keep track of things with a flagfile.
You can put the logic in the wrapper script above into the cron entry, but, as I said, it makes the entry very long, and difficult to read. |
|
||||
|
I appreciate you help!
Please can you let me know what will be the entry in crontab evne though its big I would like to test it. Thanks again |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|