I'd like to automate a manual process I am performing which unzips files on the server. If this was DOS commands, I'd do it in a whizz, I'm not too hot on Linux. Here is the sequence of events.
Monday 19:00 I ftp a zip file to server. If succesful TX I ftp a filesuploaded.flg file to the server to indicate files uploaded succesfully. PKUNZIP the files
1) 8:00pm every monday check for the existance of filesuploaded.flg. If file does not exist bomb out sending a 'filesnotuploaded' email
2) pkzip to unzip the files
3) check if one of the unzipped files exists, if yes send "success" message, if no send "pkzip failed" message.
I can work out how to submit a cron file, but how the heck do you create the 'batch' file? what name do you give it? is it possible to use condition states such as in 1) to check if file exists, wait for 1 min before timing out?
Cheers.
Monday 19:00 I ftp a zip file to server. If succesful TX I ftp a filesuploaded.flg file to the server to indicate files uploaded succesfully. PKUNZIP the files
1) 8:00pm every monday check for the existance of filesuploaded.flg. If file does not exist bomb out sending a 'filesnotuploaded' email
2) pkzip to unzip the files
3) check if one of the unzipped files exists, if yes send "success" message, if no send "pkzip failed" message.
I can work out how to submit a cron file, but how the heck do you create the 'batch' file? what name do you give it? is it possible to use condition states such as in 1) to check if file exists, wait for 1 min before timing out?
Cheers.