Hi All,
I am a newbie to Linux.
I have some ideas in my mind but I have no idea whether I can implement it on Linux or not.
I need to have a program that running on Linux pc that can run automatically everyday to check from a database table to see whether any services have reached their due date. If yes, this program need to send an email as a notification to the person-in-charge; if not, just exit the program and wait for the next run on tomorrow.
As I know, cron is program similar to task scheduler in Windows. May I know whether I can make this scheduled job happen in Linux? and how to make it?
Thanks.
Cron would be a way to start the script that would then check the database and send emails if necessary. This is definitely possible but how to do it ; that'll depend on what kind of database we're talking about ?
Hello pu8y,
1. first write your script (i suggest you to write this script in Python) :-)
2. After you are sure that your script do a exactly what you want, execute "crontab -e". This will open a file in wich you must type something like this:" 30 7 * * * /root/script.py " This will execute file "script.py" every day at 07:30am. After adding this, save and close the file. You can verify cron with "crontab -l"
Have fun ;-)
http://programming-guides.com/ - Programming tutorials, news, guides, howtos and more :-)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks