We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
CRON question
Topic Started: Nov 19 2005, 02:22 PM (315 Views)
Dennis
Member Avatar
Member
[ *  *  *  *  *  *  * ]
Hi,

I was wondering how I can setup a CRON job to reset a MySQL database to one from a file every day automatically. I want to setup a demo of one of my scripts that I can allow access to regular people using a test account. I want the database to reset every day to undo any changes people make.

Thanks,

Dennis
Offline Profile Quote Post Goto Top
 
Gornakle
Member Avatar
Member
[ *  *  *  *  * ]
Do you use CPanel? You can use the Cron jobs section to run a PHP file every day. The command to use would be:

Code:
 
php -q -f /path/to/file.php
Offline Profile Quote Post Goto Top
 
Dennis
Member Avatar
Member
[ *  *  *  *  *  *  * ]
Yes, I have cPanel.

Thanks Gornacle. :)
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Technology Chat · Next Topic »
Add Reply