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
Cron
-
- New to forums
- Posts: 6
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Mon Jan 23, 2012 11:07 am
Re: Cron
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.