FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » Database discussions » Scheduling Actions - Automation 101 question.
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Scheduling Actions - Automation 101 question. [message #4004] Thu, 11 July 2002 18:57 Go to next message
jkrische2   United States
Messages: 32
Registered: February 2002
Location: Topeka, KS
Karma: 0
Member
Hello all!

I have a minor problem to solve. I have a MySQL DB hosted out on a remote server. This DB accumulates a lot of junk records in the course of its processing, and I would like to prune them.

So, I would like to find a way to create some sort of batch file/cron job/whatever scheduled script that instructs MySQL to find records of certain criteria & deletes them, let's say daily, in a completely unattended fashion.

I have a WinXP Pro and a MacOSX 10.1.5 box available to accomplish the task (will use whichever is easier & more appropriate for the job), and need to do it as cheaply as possible - some expense is OK, but not too much. Does anyone have any suggestions, or could at least point me to a resource somewhere that is on-point?

Thanks!

John Krische
Re: Scheduling Actions - Automation 101 question. [message #4008 is a reply to message #4004] Thu, 11 July 2002 19:59 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Just write a PHP script that would connect to the MySQL server and remove the junk records. On MacOS X use a cron deamon the schedule the running of the script once a day, at midnight for example.
For example:

0 0 * * * /my/dir/remove_sql_junk.php


FUDforum Core Developer
Re: Scheduling Actions - Automation 101 question. [message #4013 is a reply to message #4008] Thu, 11 July 2002 20:22 Go to previous message
jkrische2   United States
Messages: 32
Registered: February 2002
Location: Topeka, KS
Karma: 0
Member
Thanks, I'll give that a try!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: binding mysql to localhost (I/O)
Next Topic: Getting aborted connections
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat May 04 06:29:14 GMT 2024

Total time taken to generate the page: 0.02506 seconds