• v3.2
    • Versions
    • v3.2

 

  • Install Akeneo PIM
    • Install Akeneo PIM with Docker
    • Install Akeneo PIM manually
      • System Requirements
      • System installation on Debian 9 (Stretch)
      • System installation on Ubuntu 16.04 (Xenial Xerus)
      • Installing Akeneo PIM Community Edition (CE) with the Archive
      • Installing Akeneo PIM Enterprise Edition (EE) with the Archive
      • Setting up the job queue daemon
    • How to customize the Dataset
    • How to Add Translation Packs
  • Migrate Akeneo PIM projects
    • How to apply a patch?
      • How to apply a patch - Community Edition
      • How to apply a patch - Enterprise Edition - Flexibility Cloud offer
      • How to apply a patch - Enterprise Edition - On Premise offer
    • Where is the Changelog?
    • How to upgrade to a minor version?
    • How to upgrade to a major version?
  • Import and Export data
    • How import works
    • Understanding the Product Import
    • Understanding the Product Export
    • Formats
      • Localized labels
      • Scopable labels
      • Association types data structure
      • Attribute data structure
      • Category data structure
      • Family data structure
      • Family variant data structure
      • Group data structure
      • Options data structure
      • Product data structure
      • Product model data structure
    • Akeneo Connectors
    • How to Customize Import / Export
      • How to create a new Connector
      • How to import Products from a XML file
      • How to clean a CSV file during a Product import
      • How to automate imports/exports
  • Manipulate the Akeneo PIM data
    • How to Customize Mass Edit Operations
      • How to register a new bulk action
      • How to Register a New Mass Edit Action on Products
      • How to Avoid Rules Execution on Mass Edit Actions
    • How to Manipulate Products
      • How to Query Products
      • How to Create Products
      • How to Update Products
      • How to Validate Products
      • How to Save Products
      • How to Remove Products
    • How to Manipulate Non-Product Objects
      • How to Query Non-Product Objects
      • How to Create Non-Product Objects
      • How to Update Non-Product Objects
      • How to Validate Non-Product Objects
      • How to Save Non-Product Objects
      • How to Remove Non-Product Objects
    • How to add a custom action rule
      • General information about rule format
      • How to add a custom action in the rule engine
    • How to Define Access Control List
    • How to Customize the Catalog Structure
      • How to Create a Reference Data
      • How to add a custom unit of measure
      • How to Add New Properties to a Category
    • How to Customize Product Assets
      • How to Add a New Transformation
      • How to Add a Default Thumbnail For Unknown File Types
      • How to connect to an external server for storage
      • How to change the validation rule to match a reference file to an asset
      • How to Mass Import Assets
    • How To Customize Teamwork Assistant (Enterprise Edition)
      • Customize notifications
      • Add a calculation step
      • How to log calculation step
      • Remove projects impacted by a custom catalog update
  • Design the user interfaces
    • How to customize any frontend part of the application
    • How to add an action button or meta data to the product edit form
    • How to add a tab to a form
    • How to add a new tab in System / Configuration
    • How to add custom information to a field
    • How to add a new field type
    • Create a custom product export builder filter
    • How to create the UI to manage a Reference Data
    • How to add a new page
    • How to customize the main menu
    • Styleguide
  • Maintain Akeneo PIM projects
    • First aid kit
    • Bug qualification
    • Common issues
    • Scalability Guide
      • Audit with 3 Representative Catalogs
      • More than 10k attributes?
      • More than 10k families?
      • More than 10k categories?
      • More than 500 attributes usable in the product grids?
      • More than 100k products to export?
      • More than 1GB of product media to export?
    • How to purge history
      • How to Purge jobs executions
      • How to adapt the version purger to your needs
  • Contribute to Akeneo PIM
    • How to report an issue?
    • How to translate the user interface?
    • How to enhance the documentation?
    • How to contribute to a Connector?
    • How to submit a patch to the PIM?
    • How to contribute to the frontend part of the application
    • How behavior tests are architectured in the PIM?
      • Establishing Decorator Pattern
      • Using Spin In Behat
  • Use SSO authentication locally
  • Reference Entities (beta)
    • Configure Entity Limits
    • Create a new Reference Entity Attribute type
    • Enrich Records with a new Reference Entity Attribute type
    • Add a Custom Property to Your Custom Attribute Type
    • Refresh records completeness
  • Technical overview
    • Product Information
    • Teamwork Assistant (Enterprise Edition)
      • Project creation
      • Project completeness
      • Project Completeness widget
      • Catalog update impact
      • Scalability guide
      • Users permission summary for Behat tests
    • Collaborative workflow
      • Simple workflow
      • Partial workflow
  • Technical architecture
    • Best Practices
      • Create a project
      • Create a reusable bundle
      • Setup Behat
      • Code Conventions
      • Coding Standards
    • How to implement your business logic using the event system
    • Events
      • Storage events
      • Workflow events (Enterprise Edition only)
    • How to Localize your data
      • How to change the PIM locale
      • How to Use Localizers
      • How to use Presenters
    • How to Add a Notification
    • Performances Guide
      • Memory usage of rules execution (Enterprise Edition)
      • Memory leak fix in Rules Engine (ORM)
      • More than 100 WYSIWYG editors in a page
      • PHP7 and HHVM Compatibility?
      • Job product batch size
    • How to Use the Web REST API
    • Standard format
      • Products
      • Other entities
      • Usage
    • Application Technical Information
      • Application Technical Dependencies
      • Server side set up for hosting
      • System Requirements
      • Recommended configuration
      • Client side configuration and compatibilities
      • Operation processes
      • Flow Matrix
  • Akeneo Cloud Edition
    • Flexibility Mode
      • Overview
      • Partners Starterkit
      • Environments Access
      • Composer settings
      • Periodic tasks / Crontab settings
      • PIM Application
      • PIM Updates and Migrations
      • File Transfer (SFTP)
      • Backups management
      • Partners
      • Queue management
      • System Components
      • Disk Usage
      • Ensure the Onboarder worker is always running
    • Serenity Mode
      • Overview
      • PIM Updates and Migrations
  • Akeneo Onboarder
    • Prerequisites
    • Installation
    • Migrate Akeneo Onboarder projects
      • How to apply a patch?
        • How to apply an Onboarder patch - Enterprise Edition - Flexibility Cloud offer
        • How to apply an Onboarder patch - Enterprise Edition - On Premise offer
      • How to upgrade to a minor version?
      • How to upgrade to a major version?
    • Synchronization
    • Troubleshooting
    • Environment variables
      • Using the DotEnv file
      • Using environment variables

Periodic tasks / Crontab settings¶

With every Flexibility instance comes a default configuration of the crontab according to your PIM version. As the frequency of those recurring tasks may vary depending the project needs, we do not manage cronjob changes beside the first setup. A common case is when you upgrade the PIM, you will probably need to update the crontab for the PIM to perform as intended.

Warning

It is the responsibility of the integrator to tune the cronjob according to the project needs.

Usage¶

The cronjobs are launched with the usual akeneo user. You can see the crontab using the following command:

me@localhost:$ ssh akeneo@my-instance.cloud.akeneo.com
akeneo@my-instance:$ crontab -l # Show the crontab
akeneo@my-instance:$ crontab -e # Edit the crontab

If you are not familiar with it, a crontab is a list of commands executed periodically and looks like that:

# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of week (0 - 6) (Sunday to Saturday;
# │ │ │ │ │                                       7 is also Sunday on some systems)
# │ │ │ │ │
# │ │ │ │ │
# * * * * *  command to execute

SHELL wrapper¶

We provide a wrapper in the default crontab that intend to simplify the usage of the crontab for the PIM. This shell wrapper is defined on top of the crontab with the variable SHELL and will take care of prepending the path of the PIM and the console binary also taking care of the logs. Logs will be writen in the PIM logs directory by default with this wrapper.

If you don’t want to use this wrapper you can prepend SHELL=/bin/bash, for example, before your cronjobs and do any custom implementation.

SHELL=“/usr/local/sbin/cron_wrapper.sh”
MAILTO="projectmanager@acme.com"

#Ansible: akeneo:rule:run
15 12,20 * * * akeneo:rule:run --env=prod
#Ansible: pim:versioning:refresh
30 16,23 * * * pim:versioning:refresh --env=prod
#Ansible: pim:completeness:calculate
45 */2 * * * pim:completeness:calculate --env=prod
#Ansible: akeneo:batch:purge-job-execution
20 0 1 * * akeneo:batch:purge-job-execution --env=prod
#Ansible: pimee:project:notify-before-due-date
20 0 * * * pimee:project:notify-before-due-date --env=prod
#Ansible: pim:asset:send-expiration-notification
0 1 * * * pim:asset:send-expiration-notification --env=prod
#Ansible: pimee:project:recalculate
0 2 * * * pimee:project:recalculate --env=prod
#Ansible: akeneo:reference-entity:refresh-records --all
0 23 * * * akeneo:reference-entity:refresh-records --all --env=prod

# My custom jobs
SHELL=/bin/bash

0 2 * * * sh /home/akeneo/bin/mysscript.sh
15 2 * * * python /home/akeneo/bin/myexport.py

Mail notification¶

In case you want to be notified when something wrong happens doing a task execution you can specify an email address via the MAILTO variable. The default value will be set to the administrator email but you can change it to fit your needs (by using a mailing list for example).

Execution time¶

We would like to remind you that all our servers are configured with UTC time, don’t forget to convert the time from the desired local time to UTC time.

Warning

If your country uses “Daylight Saving Time” and you want to take that into consideration on your cronjob you can follow the following trick:

# The command /foo/bar will be executed at 02:15 UTC or 03:15 UTC
# depending on the DST settings of the CET timezone
15 2 * * * [ `TZ=CET date +\%Z` = CET ] && sleep 3600; /foo/bar

Default crontab¶

The default crontab at the moment on our Flexibility environments is the following one:

Symfony console command Crontab frequency Human frequency
pim:versioning:refresh –env=prod 30 1 * * * At 01:30 AM
pim:completeness:calculate –env=prod 0 2 * * * At 02:00 AM
akeneo:batch:purge-job-execution –env=prod 20 0 1 * * At 12:20 AM, every first day of the month
pim:asset:send-expiration-notification –env=prod 0 1 * * * At 01:00 AM
pim:volume:aggregate –env=prod 30 4 * * * At 04:30 AM
pim:versioning:purge –more-than-days 90 –no-interaction –force –env=prod 0 4 * * * At 04:00 AM

Enterprise Edition specific crontab:

Symfony console command Crontab frequency Human frequency
akeneo:rule:run –env=prod 0 5 * * * At 05:00 AM
pimee:project:notify-before-due-date –env=prod 20 0 * * * At 12:20 AM
pimee:project:recalculate –env=prod 0 2 * * * At 02:00 AM
akeneo:reference-entity:refresh-records –all –env=prod 0 23 * * * At 11:00 PM

Found a typo or a hole in the documentation and feel like contributing?
Join us on Github!