Lets say you need to run a command on the last day of the month. The corn system needs you to provide the day of the month ( like 28,29,30,31) . Since the last day of the month is not a fixed date, cron comes short on this requirement.
Fortunately, these is a easy way to work around this. Shell to the rescue :
00 09 * * * [ `date -d tomorrow +'%d'` = '01' ]&&/command/to/run
Subscribe to:
Post Comments (Atom)
About Me
- Nikh Nath
- California, United States
No comments:
Post a Comment