LogoLogo
DownloadGLPI ChangelogPricesGLPI Webiste45-day free trial
  • Welcome
  • FAQ
  • FAQ Plugins
  • Tutorials
  • Videos
  • Frequently requested
  • GLPI agent
  • Changes
  • Cloud vs Self-hosted
  • Contracts
  • Cron / automatic actions
  • Current problems
  • Dashboard and counters
  • Entities
  • Financial and administrative management
  • General setup
  • Groups and users
  • Iframe
  • Installation / Update
  • Inventory
  • Knowledge base
  • LDAP(s)
  • Licences
  • My GLPI Cloud
  • Notifications / Receivers
  • Plugins and marketplace
  • My settings
  • Pre-installation - Recommendations
  • Problems
  • Profiles and habilitations
  • Reports
  • Reservations
  • Rules
  • Saved searches
  • Service levels
  • Support and partner
  • Tasks
  • Tickets
Powered by GitBook
LogoLogo

Social Media

  • GitHub
  • Instagram
  • LinkedIn
  • Facebook
  • Youtube
  • X
  • Reddit
  • Telegram

Category

  • FAQ
  • FAQ Plugins
  • Tutorials
  • Videos

Ressources

  • Download
  • GLPI Changelog
  • Prices
  • GLPI Website
  • 45-day free trial

©2025 - Teclib

On this page
  • How can I automatically synchronise my LDAP users?
  • Does the cron specified on my on-premise instance take into account the LDAP filter specified in the connection filter of my configuration?
  • Why don't the automatic actions work?
  • Why doesn't a particular automatic action work?
  • What is the difference between Logs, PurgeLogs and Circularlogs actions?

Was this helpful?

Edit on GitHub
Export as PDF

Cron / automatic actions


How can I automatically synchronise my LDAP users?

In order to automatically synchronise your users from an LDAP, you can add a line to your crontab (the one for the user who reads the web files, Apache, www-data, etc.)

0 * * * * www-data cd /var/www/glpi/ && /usr/bin/php bin/console glpi:ldap:synchronize_users --no-interaction >/dev/null 2>&1

You can add options to this command to synchronise disabled accounts as well, for example:

0 * * * * www-data cd /var/www/glpi/ && /usr/bin/php bin/console glpi:ldap:synchronize_users --no-interaction -d 3 >/dev/null 2>&1

If you want to perform several actions, we advise you to add as many LDAP commands to your cron as you need (one command for synchronising accounts, another for deactivating accounts, etc.).

You can adapt your LDAP search:

- 0: Preserve - 1: Put in trashbin - 2: Withdraw dynamic authorizations and groups - 3: Disable - 4: Disable + Withdraw dynamic authorizations and groups


Does the cron specified on my on-premise instance take into account the LDAP filter specified in the connection filter of my configuration?

Yes, if you don't specify --ldap-filter in your command line, GLPI takes the sync field + the condition indicated in the connection filter to perform the search.

Example:

  • Synchronisation field configured = entryuuid.

  • Connection filter configured = (objectClass=inetOrgPerson)

  • Resulting LDAP filter on command line = & (entryuuid=*) (objectClass=inetOrgPerson))


Why don't the automatic actions work?

  • Also check that the execution mode is set to CLI from setup > automatic actions for the action in question.

In addition to the above checks :

  • Empty the _cache and _sessions folders

  • Check file and folder permissions:

    • find glpi/ -type d -exec chmod 0755 {} \;

    • find glpi/ -type f -exec chmod 0644 {} \;

  • Restart the cron


Why doesn't a particular automatic action work?

For an automatic action to work, it must be set up correctly. From setup > automatic actions, select the action concerned. Check that it is scheduled in CLI mode.

  • GLPI: based on PHP (automatic actions are only triggered when you are logged in)

  • CLI: cron-based

Click execute if you want to run the action now


What is the difference between Logs, PurgeLogs and Circularlogs actions?

  • Circularlogs : Removes entries in logs in the files/_log folder that are older than a certain number of days which is configurable within the action form itself.

  • logs : Cleans old automatic action log entries. The amount of time to keep log entries can be changed for each automatic action.

  • PurgeLogs : Deletes historical data entries that are older than a certain amount of time. The amount of time can only be changed globally for all Entities, but some of the types of entries can be configured with different durations.

Last updated 2 months ago

Was this helpful?

If you are in the Cloud, you can contact support so that the checks can be made on the server side:

If you are on-premise, check that your cron is active and correctly configured:

contact form
cron et automatics actions
Alt text