On Tuesday 09 April 2002 14:50 pm, Sunil V. wrote: > Hello , > I am trying to schedule some jobs using cron. I am not able to come up with > 'crontab' for > my following needs > > 1. An action to be executed at 10am on every 'first' monday of the month. > Is there any workaround to specify such an action
This is not possible with Vixie cron. A workaround is to run the program on the first week of every month, and to check if the weekday is a Monday in the program itself. Like: 0 10 1-7 * * /path/to/program And, in program, have: foo=$( date '+%w' ) if [ $foo -ne 1 ]; then echo "Not a Monday" exit 1 fi # Continue processing... > > 2. I have to execute an action daily (say at 9am) from Apr 1st to May 15th. > How can I specify such a range using cron. Have two entries in crontab. Like: 0 9 * 4 * /path/to/prgram 0 9 1-15 5 * /path/to/program Binand _______________________________________________ linux-india-help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/linux-india-help
