GLPI by default uses a so-called pseudo-cron to run its automated, scheduled tasks (they are called Automatic actions in GLPI). That is a nice way of running tasks in the background since it does not require setting up a real cronjob.
This approach, however, requires users to browse GLPI. If your GLPI site is heavily used this wouldn’t be a problem but in some cases, users are interacting with GLPI via its email system. Emails are then being held until somebody logs in, no matter if a customer or an agent, pseudo-cron doesn’t care.
To get it run without further interaction, in fully automated mode, we need to create a cronjob which is run repetitively by native Linux cron and switch desired Automatic actions to CLI Run mode.
In order to edit crontab run a command:
sudo crontab -e
Then edit the crontab, it will likely be empty, paste this as a new line:
*/2 * * * * /usr/bin/php5 /usr/share/glpi/front/cron.php &>/dev/null
It will run every 2 minutes (feel free to adjust to fit your needs, 2 minutes are pretty standard).
Note: Editor writes the file and closes with „:wq“.
Once we have completed setting up a cronjob with Linux cron, we just need to change Run mode of desired Automatic actions to CLI (instead of GLPI) in GLPI (Setup > Automatic actions).