943,838 Members | Top Members by Rank

Ad:
Jul 28th, 2009
0

automated database script

Expand Post »
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].
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jbd4d is offline Offline
13 posts
since Jul 2009
Jul 28th, 2009
0

Re: automated database script

Schedule a job to run the script at whatever interval you want.
Reputation Points: 91
Solved Threads: 18
Junior Poster
cgyrob is offline Offline
125 posts
since Sep 2008
Jul 28th, 2009
0

Re: automated database script

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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jbd4d is offline Offline
13 posts
since Jul 2009
Jul 28th, 2009
0

Re: automated database script

I don't know mysql very much but if you schedule a job it should not care if a file is open or not.
Reputation Points: 91
Solved Threads: 18
Junior Poster
cgyrob is offline Offline
125 posts
since Sep 2008
Jul 29th, 2009
0

Re: automated database script

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.

sql Syntax (Toggle Plain Text)
  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:

sql Syntax (Toggle Plain Text)
  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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jbd4d is offline Offline
13 posts
since Jul 2009
Jul 29th, 2009
0

Re: automated database script

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.
Reputation Points: 91
Solved Threads: 18
Junior Poster
cgyrob is offline Offline
125 posts
since Sep 2008
Jul 29th, 2009
0

Re: automated database script

alright, thanks cgyrob
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jbd4d is offline Offline
13 posts
since Jul 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Database Design Forum Timeline: Design Work Of college management
Next Thread in Database Design Forum Timeline: Employee Salary





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC