Setting up scheduled tasks / cron jobs

A Cron job (Linux/Unix/Mac) or Scheduled task (Windows) is a way to have a certain action be executed at set intervals or specific times/dates.

It allows you to make the system check for new orders every (say) 2 hours and synchronize the product (offer) feed every weekday at 10:00, 14:00 and 17:00.

On the home page of the module you can find links to manually synchronize the product feed or fetch orders.
You can copy those links (urls) you can use those for your cron or task scheduler.

Or construct them yourself.

The Cron URL structure

http://<your website>/<optional path to prestashop>/modules/bolcom/cron.php?action=<action>&account=<account id>&cron_token=12345676d13dd

Variable “action” MUST be one of the following:

  • FETCH_ORDERS – Check for new (not yet imported) orders at bol.com and import them.
    Run this process every 15 minutes.
  • PROCESS_OFFER_QUEUE – Some communication with bol.com’s offer queue consists of two steps between which at least a few seconds must have passed. This would negatively affect the performance of your Back Office and thus some communication is queued for later processing.
    Run this process every 5 minutes. (It has a minimal effect on your server’s performance.)
  • RESYNC_OFFERS – Download all offer information from bol.com and look for mismatches with Prestashop’s Database. Mismatches will be deleted and recreated at bol.com immediately
    Run this process once or twice per day.

Any other value for ACTION will result in an error: “cron: No (valid) cron action specified

Variable “account id” is optional and can be omitted from the URL.
If specified this should contain an existing “seller ID” (bol.com “verkopernummer”) as specified through the “Manage accounts” screen.
If omitted, the chosen action will be executed for all bol.com accounts.

Examples

  • https://example.com/modules/bolcom/cron.php?action=FETCH_ORDERS&account=1234567&cron_token=12345676d13dd
    Fetches the orders for account 1234567 only.
  • https://example.com/modules/bolcom/cron.php?action=FETCH_ORDERS&cron_token=12345676d13dd
  • https://example.com/webshop/modules/bolcom/cron.php?action=PROCESS_OFFER_QUEUE&account=1234567&cron_token=12345676d13dd

More info

Are you not familiar with Cron jobs or scheduled tasks? Then have a look at these tutorials: