arvind Posted September 9, 2003 Posted September 9, 2003 Ok I've got Movable Type setup in an mt folder in my public_html in that folder I have a cgi script called rebuild which basically just exports all my entries. Now how do I setup a cron job do run that script say every 10 days ? Quote
TCH-JimE Posted September 9, 2003 Posted September 9, 2003 Hi, This might help: http://www.totalchoicehosting.com/forums/i...l=dbsender&st=0 Jim Quote
arvind Posted September 9, 2003 Author Posted September 9, 2003 thanks but this is slightly different. I know that backing up mysql db will backup my entries as well (i think) but this rebuild script will export all my entries for me so how do I run just that cgi script ? Quote
a__kc Posted September 13, 2003 Posted September 13, 2003 Hi, The basic ideas behind running Cron are the same, however, database or not. Since I've recently gone through the (surprisingly) painful process of learning about Cron, I feel I should pass on what I know. One of the better articles on Cron: http://perlhorizons.com/02/12/29/186209 But if you don't have shell access, you can still use CPanel's interface to get it done. Assuming your CGI is a Perl script, try something like 0 0 * * 1 perl full_path_to_my_script This will run your script every Monday (=1) at hour 0, minute 0 (i.e. midnight). Unfortunately it is not so easy to run a script every 10 days (or 56 days) this way. But weekly is close enough. Or is that too frequent? We should be kind to our server. So every two weeks may be sufficient, in fact around the middle of the month(=15), still at midnight. We don't care about the day of the week: 0 0 15 * * perl full_path_to_my_script But you probably don't want to run Cron at midnight, when lots of other cron jobs are being called to duty. Every Wednesday morning at 7:47 AM sounds better. 47 7 * * 3 etc. There's more to Cron. You can dump the results (e.g. the exported Movable Type entries file) into a file, for example. Search the fora for the threads. They're there. Oh, and make sure the script you intend to run is written to use full paths, too, or strange things may happen. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.