Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run command at certain time?

Status
Not open for further replies.

jfong716

Technical User
Jun 27, 2002
4
US
i have a certain script that runs at 2:15 am in the morning. at that time it will email me if the a certain file is present or not. if it is present, the system is working. if its not present the system is down. how do i delay a certain part of the script to email me at 8 o clock instead of when the script is actually ran? thanks for all input
 
Best to split the script into two parts. Run the first at the regular time and the second at 8AM.
As an alternate, you could delay the running until later, or you could put the script to sleep between the first and second parts.
Or you might have to change the reporting to a file and the mailing as a separate issue.
You'll have to figure out the reporting method to do any of it. Ed Fair
unixstuff@juno.com
Any advice I give is my best judgement based on my interpretation of the facts you supply. Help increase my knowledge by providing some feedback, good or bad, on any advice I have given.
 
Run ur script at 2.00 AM in the morning, check whether ur file is present. If the file is present, schedule a mail to your account with the help of "at" command (in the script).

Hope this helps..

Regds,

- Hemant
Networking and Systems Integration Group
Satyam Computer Services Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top