Setup cron jobs


Files attached through our Dynamic File Attachments extension can be deleted automatically on a schedule. Deleting old attachments procedure is run using Magento cron tab. To make your system run these scheduled tasks it self, you have to set up cron or other automation scheduler on the server.

Cron jobs for automated dynamic attachment files deletion

What crontab entry in Magento config files does is to tell Magento which Class::Method to run and how often to create schedules. This means that to achieve real automation in terms of having your system run these automated schedules on its own, you have to set up a cron job on the server. Read more about setting up cron jobs in Magento.

For cron (most widely used solution):

Recommended setting in production environment is:

*/5 * * * * /path/to/php /path/to/magento/cron.php >/dev/null 2>&1

The above means that cron on server will run cron.php every 5 minutes. And when it runs it will execute all various crontab jobs found.

For testing and debugging purposes last portion of the cron line could be changed to a log file:

*/5 * * * * /path/to/php /path/to/magento/cron.php >>/path/to/magento/var/log/cron.log

This way all output from the operation will be logged.

See also: