Hello All,
I do not use UNIX but I need help with a UNIX scenario.
I am interested in having a cron job run every Friday or the 1st of each month. (The cron will extract data into a CSV file.)
1) If the 1st is a Friday, will the cron automatically ensure that it only runs once?
2) Also if the 1st is a Saturday I don’t want the file to be generated (long story). I understand that the cron itself would run when scheduled and execute the script it’s told to. Is it possible to have a conditional check in the script to see if the 1st is a Saturday and if it is quit the job?
If you could let me know if these two points are possible and point me in the direction to research them (ie what command for the conditional logic and what command for determining the Day of Week) I would appreciate it.
Thanks
I do not use UNIX but I need help with a UNIX scenario.
I am interested in having a cron job run every Friday or the 1st of each month. (The cron will extract data into a CSV file.)
1) If the 1st is a Friday, will the cron automatically ensure that it only runs once?
2) Also if the 1st is a Saturday I don’t want the file to be generated (long story). I understand that the cron itself would run when scheduled and execute the script it’s told to. Is it possible to have a conditional check in the script to see if the 1st is a Saturday and if it is quit the job?
If you could let me know if these two points are possible and point me in the direction to research them (ie what command for the conditional logic and what command for determining the Day of Week) I would appreciate it.
Thanks