automated database script

Thread Solved

Join Date: Jul 2009
Posts: 13
Reputation: jbd4d is an unknown quantity at this point 
Solved Threads: 0
jbd4d jbd4d is offline Offline
Newbie Poster

automated database script

 
0
  #1
Jul 28th, 2009
Im not sure if this is the proper place to be posting this but...
I have a dedicated server that i would like to automatically run a script every 10 minutes/ half hour / any set period of time. I do not want to have to leave my personal computer running/ have a web page open. I was wondering if its possible to have my server run a "script" on its own every [set period of time].
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 118
Reputation: cgyrob is on a distinguished road 
Solved Threads: 18
cgyrob's Avatar
cgyrob cgyrob is offline Offline
Junior Poster

Re: automated database script

 
0
  #2
Jul 28th, 2009
Schedule a job to run the script at whatever interval you want.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 13
Reputation: jbd4d is an unknown quantity at this point 
Solved Threads: 0
jbd4d jbd4d is offline Offline
Newbie Poster

Re: automated database script

 
0
  #3
Jul 28th, 2009
i read that mysql can do an event scheduler, does that run even if the file isn't open? If not is there a way to make it?
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 118
Reputation: cgyrob is on a distinguished road 
Solved Threads: 18
cgyrob's Avatar
cgyrob cgyrob is offline Offline
Junior Poster

Re: automated database script

 
0
  #4
Jul 28th, 2009
I don't know mysql very much but if you schedule a job it should not care if a file is open or not.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 13
Reputation: jbd4d is an unknown quantity at this point 
Solved Threads: 0
jbd4d jbd4d is offline Offline
Newbie Poster

Re: automated database script

 
0
  #5
Jul 29th, 2009
is this the kind of thing youre talking about? I don't really know much about servers or what job scheduling is, but this seems to be what youre talking about, let me know if this is completely off-base:

"
DBMS_JOB does this exactly.

  1. SELECT TEXT
  2. FROM all_source
  3. WHERE name = 'DBMS_JOB'
  4. AND type = 'PACKAGE'
  5. ORDER BY line;


In your case, it is very easy:

  1. DECLARE
  2. l_job number;
  3. BEGIN
  4. dbms_job.submit( l_job,
  5. 'abc;',
  6. trunc(SYSDATE)+4/24,
  7. 'trunc(sysdate)+1+4/24' );
  8. END;
"
Last edited by peter_budo; Jul 30th, 2009 at 8:15 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 118
Reputation: cgyrob is on a distinguished road 
Solved Threads: 18
cgyrob's Avatar
cgyrob cgyrob is offline Offline
Junior Poster

Re: automated database script

 
0
  #6
Jul 29th, 2009
Here is a link to an article on creating an event schedule in mysql, unfortunately I don't use mysql so it is the best I can do for you.

http://dev.mysql.com/tech-resources/...t-feature.html

If this doesn't work possibly you can use windows task scheduler to call the job.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 13
Reputation: jbd4d is an unknown quantity at this point 
Solved Threads: 0
jbd4d jbd4d is offline Offline
Newbie Poster

Re: automated database script

 
0
  #7
Jul 29th, 2009
alright, thanks cgyrob
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC