Novice_Techie
Novice_Techie

Reputation: 444

File watch in Autosys

We have a SQL table that is populated by some jobs. The table structure is

ID  Date    Name
1   6/10/2017   sales
2   6/10/2017   marketing
3   6/17/2017   Loans

We recieve files on our server from vendors weekly.

For instance we received a file called Sales_6/10/2017.txt.

My autosys job need to watch this file and search it within table above. If the date and name matches in table then only further my job should run. If it doesn't find the entry in table then it must not run.

i am not able to figure out how to get this file watch along with checking with entry in table.

Upvotes: 0

Views: 990

Answers (1)

Erick B
Erick B

Reputation: 1272

Autosys can handle the file watcher, but it cannot execute a SQL query as a condition for starting a job. You should put that functionality into a shell script that is called by Autosys when the file arrives. The shell script should perform the query and then decide whether to proceed, depending on the results.

Upvotes: 1

Related Questions