Archive: cron

 

Posts Tagged ‘cron’


If you are handling a server migration and would like to have a scripted way to copy the crontab from one machine to the other then you might like this little snippet. PLAIN TEXT CODE: ssh -p2020 root@123.123.123.123 'crontab -l' | crontab - This will get the contents of the root crontab from one server [...]



 

The indexes for your Magento site should be refreshed on a regular basis. To help you do this you can put the below code in a PHP file in the root of your web site and setup a scheduled task to call it periodically. PLAIN TEXT PHP: require_once 'app/Mage.php'; $app = Mage::app('admin'); umask(0); for ($i [...]



 

Running PHP on the command line, via cron etc there are a few common problems you can hit and from experience this my recommendations to avoid them. It seems that (on CentOS at least) PHP does not display errors by default on the command line. You will want it to I assume so you can [...]



 

If you have some cron jobs set up and you are finding large amounts of files saved in your home directory (or root) then perhaps you have the same issue I had. I was using wget to call on some PHP scripts to run periodically. wget will do what it says on the tin and [...]