Question

I'm using DreamHost as the server for my website, and I'm trying to execute a certain MySQL query every day, week, and month to change the database for my website. I started out using the event scheduler on my local host, then I found out I'm not able to use it on DreamHost because I don't have the "super" privileges for it.

Anyways, my question is, is there a way to execute a query such as:

UPDATE table
SET field1 = field2, field2 = 0

every day, week, and month at midnight? Or is there a way to execute a PHP script at a certain time with that MySQL in it?

Thanks for your help!

Was it helpful?

Solution

Dreamhost allows for cronjobs ; see http://wiki.dreamhost.com/Crontab for some useage examples.

See also How can i set a crontab to execute a mysql query and log the output? for more detailed information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top