Cron

Connect with other users about what to run on your webhosting (and how to run it) here.
Post Reply
Reinier324
New to forums
New to forums
Posts: 6
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Mon Jan 23, 2012 11:07 am

Cron

Post by Reinier324 »

Hello,
So I want a system that wipes certain databases every month. I was wondering if that's possible with cron?
For example: @monthly php -q test.php
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Cron

Post by Edge100x »

You could do this with cron and the mysql command-line client or another script, yes. For instance, you could create a .sql file that drops the database and then recreates it and any tables, and use "mysql -p yourpassword < thatsqlfile" to import it. Make sure that you test the command through SSH first to verify that it does what you want.
Post Reply