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>

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 does not hurt your server’s performance.)
  • IMPORT_OFFERS – Download all offer information from bol.com and update the bol.com connector module’s database accordingly.
    Run this process 1x 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
    Fetches the orders for account 1234567 only.
  • https://example.com/modules/bolcom/cron.php?action=FETCH_ORDERS
  • https://example.com/webshop/modules/bolcom/cron.php?action=PROCESS_OFFER_QUEUE&account=1234567
  • https://example.com/modules/bolcom/cron.php?action=IMPORT_OFFERS&account=9876543
    Uploads the product feed to bol.com for account 9876543 if there changes have been made since the last upload.

More info

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