reg Cron Jobs

hi,I need to run a cron job every alternate wednesdays...in a yearAny suggestions?Thnx,Enz
[125 byte] By [coolbuddy] at [2007-11-26 10:44:50]
# 1

Method 1: Run a cron job every wednesday. Run your job if `date +%U` is even.

problems: Some years will have 53 wednesdays, so eventually you'll run your job on consecutive weeks.

Method 2: Run a cron job every wednesday. Set a file as a sentinel. If clear, set it and run your job. If set, clear it and dont' run the job.

problems: If the cron job fails to run, your "alternate week" might get out of sync. Someone might screw up the sentinel file.

Pick one based on your needs

--

Darren

Darren_Dunham at 2007-7-7 2:56:53 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 2
thnx Darren....is it possible to run a job every 1.5 hrs...i.e 0000, 0130, 0300, 0430......
coolbuddy at 2007-7-7 2:56:53 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 3
Have cron run it every half hour and check if it's one of the "correct" half hours.-- Darren
Darren_Dunham at 2007-7-7 2:56:53 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...