How to set up a cron job in Magento

Haudegen

Can someone please explain me, what I have to do? I want Magento to clean logs, create a sitemap every day.

Is this the right order:

  1. Setup Cron in Server
  2. Setup Cron in Magento
  3. What will be next step?

How do I do step 1 and 2? What will be step 3? Do I have to wait?

pymkin

Setting up cron on your server

Use crontab -e to edit your cron jobs. To run a daily cron, add a line like this:

0 3 * * *  /bin/sh /path/to/magento/cron.sh

This will run at 3 AM every night.

For log cleaning, you can check /path/to/magento/shell/log.php.

Set up cron in Magento

In the Magento admin, go to: System > Configuration > Advanced > System > Cron (Scheduled Tasks) and configure cron jobs you wish to run.

You should know that Magento runs cron jobs even if you don't have a daily cron job configured. Whenever Magento receives a request, it checks if there are any cron jobs to be run. Therefore, having the daily cron job would only make sense if you had no requests for an entire day.

Really there is no next step to be done. I recommend you read How to Set Up a Cron Job.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to set up a root cron job properly

From Dev

How to set up a Cron Job Programmatically?

From Dev

How to set up a root cron job properly

From Dev

How do I set up a Cron job?

From Dev

Set up `cron` job and mailto on error, on Arch

From Dev

How to set up cron to call php script - bash: */5: No such file or directory for setting cron job

From Dev

Magento cron job not working

From Dev

Cron Job issue Magento

From Dev

How to run cron job when network is up?

From Dev

How do I set up a Vagrant box to always have a cron job?

From Dev

How to set cron job url for codeigniter?

From Dev

How to set a cron job to run a shell script?

From Dev

How to set a cron job to run a shell script?

From Dev

How to set a cron expression of cron job from controller in Grails

From Dev

Set cron job issue

From Dev

Magento - How to clean up attributes not in attribute set

From Dev

How to schedule a cron job to run at app start up?

From Dev

how can I speed up my cron job / database update

From Dev

Setting Up a Python Cron Job

From Dev

Create Magento cron job task programmatically

From Dev

Magento indexer running via ssh but not cron job

From Dev

Magento Cron Job Error - Invalid Callback

From Dev

GAE Python - How to set a cron job to launch a backend task

From Dev

How to set permissions so job runs from cron

From Dev

How to set a cron job to run every 3 hours

From Dev

How to set permissions so job runs from cron

From Dev

How to reconnect an OpenVPN VPN set by Tunnelblick automatically in a cron job?

From Dev

How can I remove a cron job set as user ubuntu

From Dev

How to set a cron job on Skygear to run every 12 hours?

Related Related

HotTag

Archive