Quote:
Originally Posted by tushar.jadhav29
Every month in last date cron job has to run ( where i am observe
month end may come 31, 30,28.so how we can write the rule)
|
You can't do this kind of rule with cron.
What you can do is schedule your job to run on days 28,29,30,31 and use this test as part of the jobs bash script:
Code:
if [ $(date +%d -d "tomorrow") -ne 1 ] ; then exit 128 ;fi
This will cause your script to exit with errorlevel 128 if it's not the last day of the month or continue if it is the last day of the month.