Results 1 to 5 of 5

Thread: scheduler task

  1. #1
    Join Date
    Feb 2004
    Posts
    6

    Unhappy Unanswered: scheduler task

    Hi,
    I am using mysql for DBMS, jsp, tomcat for server, window for OS. I am trying to scedule a task when it reaches 12:00am everyday, the database update itself with the column I specfic.
    Thanks alot

  2. #2
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: scheduler task

    Originally posted by samwong
    Hi,
    I am using mysql for DBMS, jsp, tomcat for server, window for OS. I am trying to scedule a task when it reaches 12:00am everyday, the database update itself with the column I specfic.
    Thanks alot
    Unfortunatelly there are not jobs in MySQL.
    You need write some script (in Perl, bash or whatever) which will connect to the DB and execute the update operation.
    If you are using Unix like OS then use the "cron" and if you are using Windows then try it with "scheduled tasks" or "at".

  3. #3
    Join Date
    Feb 2004
    Posts
    6

    Unhappy Re: scheduler task

    Originally posted by ika
    Unfortunatelly there are not jobs in MySQL.
    You need write some script (in Perl, bash or whatever) which will connect to the DB and execute the update operation.
    If you are using Unix like OS then use the "cron" and if you are using Windows then try it with "scheduled tasks" or "at".
    How do i use "scheduled tasks" or "at"? Is there a way to use jsp for that?
    Thanks again.

  4. #4
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: scheduler task

    Originally posted by samwong
    How do i use "scheduled tasks" or "at"? Is there a way to use jsp for that?
    Thanks again.
    How do i use "scheduled tasks" or "at"? - look for some Windows howto
    Is there a way to use jsp for that? - This is not good idea because JSP is server side language wich depends on application server.

    Better solution is to create the bath file with:
    C:\somewhere\mysql.exe -h somehost -u usrname -p password -d databasename -e "update ......"
    and this batch file schedule in scheduled tasks

  5. #5
    Join Date
    Oct 2003
    Posts
    706
    There are several scheduled-tasks tools available in Windows or in Unix. Use whichever scheduler suits your fancy.

    Likewise, use whatever scripting-language suits your fancy. Notice, however, that the program won't be executing in the context of a web-server; it will simply be a program running on some computer somewhere.
    ChimneySweep(R): fast, automatic
    table repair at a click of the
    mouse! http://www.sundialservices.com

Posting Permissions

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