Reputation: 41
I want to write a file watcher in autosys that waits for a file like imsbestex_20111012
. The date appended to the end of the file name keeps changing everyday. Therefore I want my autosys job to search for a file name begining with imbestex_%
. Even though I am using
watch_file: /v/global/user/s/sr/sritamd/BESTEX/imsbestex_%
The job doesnt work in the desired way. Is it not possible to use wild characters to specify a generic file name?
Please help.
Upvotes: 0
Views: 9826
Reputation: 165
If you are specifc about looking for particular file name, based on date:
You can use a enviornment variable defined in the profile file. This variable can be updated with today's date as in the example given below. Because the profile is sourced on each run of the job, the variable will be available to the autosys job.
In unix based enviornment, add following to profile file:
export TODAYS_DATE=`date +%Y%m%d`
In the autosys file watcher job, use the variable as follows:
watch_file: /v/global/user/s/sr/sritamd/BESTEX/imsbestex_${TODAYS_DATE}
Upvotes: 0
Reputation: 6154
The wildcard in AutoSys for job names is a percentage (%), but for file names it's an asterisk (*).
watch_file: /v/global/user/s/sr/sritamd/BESTEX/imsbestex_*
-t.
Upvotes: 0