Hello All,
I have a job (my_job) to be executed in crontab. I only want my_job to be executed at certain non-uniform dates. So I think the best way is to have a shell script wrapper around the job. So that I can pass my date file as parameter.
The parameter file will be like:
20091124
20091130
20091210
20100103
....
....
20101109
1) I will set up the job to run every day at say 10:00pm in crontab
2) Once the job starts, first thing to do will be to fetch the date paremeter file, go through each line see if the date is equal to today's date, if so execute and send an email to me that it executes my_job. If not the date is not equal to today's date exit.
Question: Does anyone have a script that could do line item 2) ?
Thanks for your prompt reponse everyone, much apreciated.
Tekpr00
I have a job (my_job) to be executed in crontab. I only want my_job to be executed at certain non-uniform dates. So I think the best way is to have a shell script wrapper around the job. So that I can pass my date file as parameter.
The parameter file will be like:
20091124
20091130
20091210
20100103
....
....
20101109
1) I will set up the job to run every day at say 10:00pm in crontab
2) Once the job starts, first thing to do will be to fetch the date paremeter file, go through each line see if the date is equal to today's date, if so execute and send an email to me that it executes my_job. If not the date is not equal to today's date exit.
Question: Does anyone have a script that could do line item 2) ?
Thanks for your prompt reponse everyone, much apreciated.
Tekpr00