Use cron for automated tasks
In a default install of GLPI there are 36 automated tasks that are individually configured to run at different times. When running your cron job, you can configure the maximum number of tasks to be run each time.
- Log on to GLPI.
- Go to Setup > General.
- Select the System tab, in the left pane.
- Set the Maximal number of automatic actions (run by CLI).
The default number is 5 actions, which if you set the cron job to run frequently enough should be fine.
How you create a cron job will depend on your hosting situation. This article describes how to achieve this using Siteground hosting, but the steps might be similar for other situations.
- Log on to your web host provider.
- Go to the Cron Jobs configuration page.
- Command: php /path_to_your_root_directory/front/cron.php
- Interval: Select manually
- Minute Hour Day Month Weekday: */1 * * * *
This will trigger the cron job every minute, which is useful in test mode, so you can easily see if it's working. Depending on the urgency of receiving tickets for example, you might configure this to run every 10 or 15 minutes?
By default many automatic actions are triggered by the GLPI method, so you can change some of these to CLI.
- Go to Setup > Automatic actions.
- Click the record to open it for editing (e.g. mailgate).
- Select the Automatic action tab in the left pane.
- Change Run mode from GLPI to CLI.
- Click Save
This Automatic actions will now be triggered by the cron job. Here is a list of Automatic actions that I like to be triggered by CLI.
Thanks for visiting,