A cron job is a process that is executed on its own. The cron job is typically executed in WooCommerce every minute.

The cron job applies updates from Megaventory to your WooCommerce. There are two subtasks that are processed. The first task performs Quantity updates and the second one Order status updates.

Alternatives to cron jobs

Some servers do not support by default cron jobs. In this case, you can also run the two cron jobs manually in the Megaventory page by clicking Pull Updates From Megaventory.

Setting up a cron job manually

Alternatively, you can set up a cron job manually.

To setup the cron job, depending on the setup, you either need to log in to the administration panel (cPanel, plesk, etc) and add a scheduled job or to manually insert it on the crontab (this requires super user access to the server and/or SSH for remote access).

Using the administration panel:

You need to find the cron scheduler and add a new task, and depending on the interface you need to enter the following information:

The executable task should be

/usr/local/bin/php -q <WORDPRESS_ROOT>/wp-cron.php

where <WORDPRESS_ROOT> should be replaced with the absolute path to the root directory of WordPress.

The ideal interval for the cron job should be 1-3 minutes.

Using the terminal:


Using the terminal, run the following command:

sudo crontab -e

In an empty space insert the following cron expression:

*/3 * * * * /usr/local/bin/php -q <WORDPRESS_ROOT>/wp-cron.php

where <WORDPRESS_ROOT> should be replaced with the absolute path to the root directory of WordPress.

Save the file by pressing escape and type :wq to confirm if prompted.

NOTE: A restart of the server might be required for the manual method.


Did this answer your question?