If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > scheduler task

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-04, 00:33
samwong samwong is offline
Registered User
 
Join Date: Feb 2004
Posts: 6
Unhappy 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
Reply With Quote
  #2 (permalink)  
Old 03-03-04, 03:30
ika ika is offline
Registered User
 
Join Date: Oct 2003
Location: Slovakia
Posts: 482
Re: scheduler task

Quote:
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".
Reply With Quote
  #3 (permalink)  
Old 03-03-04, 07:09
samwong samwong is offline
Registered User
 
Join Date: Feb 2004
Posts: 6
Unhappy Re: scheduler task

Quote:
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.
Reply With Quote
  #4 (permalink)  
Old 03-03-04, 08:25
ika ika is offline
Registered User
 
Join Date: Oct 2003
Location: Slovakia
Posts: 482
Re: scheduler task

Quote:
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
Reply With Quote
  #5 (permalink)  
Old 03-03-04, 23:05
sundialsvcs sundialsvcs is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On