Skip to content

8.11 How to create a planified task with CRON

Juan Fernando Villa Hernández edited this page Mar 13, 2015 · 1 revision

GLPI use an internal “pseudo cron”. Scheduled tasks are launch automatically when there is activity on the application (by connected users calling pages).

If you want this tasks to be launched even without any activity, you can create a system planified task.

Linux

Requirement: php5-cli

You must add a cron task like :

*/5 * * * * /usr/bin/php5 /var/www/monsite.com/glpi/front/cron.php &>/dev/null

This task will run the cron.php script every 5 minutes, it will launch the GLPI scheduled tasks automatically.

This task must be launched by the user running the web server (apache or www-data, according to your distribution).

If nothing append, check that in the file

/etc/php5/cli/php.ini

memory_limit is set to 32Mo at least. On Ubuntu if you use IMAP for receiver add “extension=imap.so”. You can check the result by typing :

tail -f /var/www/monsite.com/glpi/files/_log/cron.log