we have some scheduled jobs.The jobs will truncate the data and inserting the data and update the data.This process will happen daily. we receive files like truncate_file,Insert_file and update_file to our INBOX in scheduled time.once we got the update_file we will connect to front end application by using user_id and password. Then we have some rules.we will start running those rules. once the status shows "completed" then we will again goto mailbox and then send a mail to distributed mail list as " Monday data loaded successfully" ( if it is monday) this will happen daily.we are doing all these process manually.

But please suggest me is there any possibility to write a script for the above mentioned process.if it is Monday then monday else the name of the day.

if the update_file is not yet arrived it should wait for 20 mins then it will send a mail like " the job got failed " message to the mail box.

please help me out to write a script for this.Please let me know if you need more information.


You can write email messages directly. I'd suggest using a scripting language (Ruby, Python, Perl) they all have facilities to both manage time (day of the week) and SMTP (for constructing email messages).