Hi,
unfortunately I don't have deep programming skills yet to create a little cronjob. It would be great if someone could help me with my little programm. How it should be programmed and correctly embedded to the cron daemon.
The programm should do the following:
- Connect to a NFS share
- If connection fails for several times, a mail should be sent to an admin
- If connection succeeded look for two files with the pattern 'File1_.XXX' and 'File1_.YYY'
- If both files are found move files to local system and append the actual system time to the files (in front of the file suffix)
- Look in another directory for the file having the pattern 'File2_*' und rename it to'File2_YYYYMMDD_HHMMSS' with YYYYMMDD_HHMMSS being the timestamp from step 4
- If there is more than one file with the pattern 'File2_*' send a mail to an admin and stop the program
- Wait for a minute and remove the two files with pattern 'File3_*'. If there are not exactly two files with that pattern, send a mail to an admin
It is necessary that the job only runs once at a time.
It would be great if someone could help me along with my little program.
Thanks in advance!
Heinz