Closed Thread
Results 1 to 3 of 3

Thread: Scheduler in Linux to check from database

  1. #1
    pu8y is offline Newbie
    Join Date
    Aug 2009
    Posts
    6
    Rep Power
    0

    Scheduler in Linux to check from database

    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.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    denarced is offline Programmer
    Join Date
    Jul 2008
    Location
    Joensuu, Finland
    Posts
    182
    Rep Power
    0

    Re: Scheduler in Linux to check from database

    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 ?

  4. #3
    Corwin's Avatar
    Corwin is offline Newbie
    Join Date
    Mar 2010
    Location
    Europe
    Posts
    12
    Rep Power
    0

    Re: Scheduler in Linux to check from database

    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 :-)

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Scheduler/VB6 program running in Linux Fedora
    By pu8y in forum Visual Basic Programming
    Replies: 6
    Last Post: 11-26-2009, 11:51 AM
  2. Replies: 3
    Last Post: 09-23-2009, 08:40 AM
  3. Linux/Bash: Check if a file exists
    By Tor in forum Bash / Shell Scripting
    Replies: 4
    Last Post: 07-10-2009, 11:28 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts