Jump to content

Scheduling Tasks for PHP Scripts


random1

Recommended Posts

Hey All,

 

How do you run tasks (say backing up a database) at a certain time (say 1:00AM) on a schedule (say every morning, Mon-Fri)?

 

I am running Windows XP with Apache, PHP, mysql. I know of 'Task Scheduler' for Windows and 'cron job' for *nix systems.

 

Is there a better way of doing this, any PHP5 packages to recommend?

Link to comment
https://forums.phpfreaks.com/topic/113506-scheduling-tasks-for-php-scripts/
Share on other sites

You could create a script that would dump your database, and then have that script run by a cron job at timed intervals.

The system function mysqldump() can dump the DB info into a file for you and save it to a directory of your choosing (preferably out of access)

 

That's what I do to backup my databases.

 

http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.