1 2For Linux/Unix platforms only: 3 4WARNING: FusionInventory Agent would better be installed as systemd service and 5this is the recommanded way of doing. 6 7FusionInventory agent is expected to run its tasks on a regular basis and is better 8installed as service. Its memory and load footprints are low enough for modern desktop computers. 9 10To know better about the FusionInventory agent execution modes, you should read 11the online Agent usage page: 12http://fusioninventory.org/documentation/agent/usage.html 13 14You should use cron if you don't want a fusioninventory-agent process to be running 15all the time and if you don't need to trigger it remotely (from the server 16or manually, locally contacting the `http://localhost:62354/` page). 17 18So if you prefer to run FusionInventory Agent as scheduled cron job, you may need 19to do the following as root: 201. stop and disable the fusioninventory-agent service (if start/enabled): 21 systemctl stop fusioninventory-agent 22 systemctl disable fusioninventory-agent 23 242. create a /etc/fusioninventory/conf.d/better-for-cron.cfg file with the following 25 lines: 26 # Don't force agent to run inventory at each run, but only 27 # after server defined timeout has been reached 28 lazy = 1 29 303. as example, add a root cron job like this: 31 # Don't remove --wait option (delay in seconds) so the agent wait a random 32 # time before really run its work 33 00 */4 * * * /usr/bin/fusioninventory-agent --wait=1800 >/var/lib/fusioninventory-agent/cron.log 2>&1 34 35For large companies, be aware you can lead to concurrent execution issues 36if you don't enable agent `lazy` option with cron scheduling and even more if you forget to 37use `--wait` option. To avoid such missconfiguration, you would prefer leave the agent 38started as systemd service and define a peaceful delay on server. You may adjust scheduled 39time and wait command line only option to your needs. 40 41As a reminder, when launched without the daemonize configuration directive 42as usually done from cron, the agent is a short-lived process, without 43the ability to listen on the network for out-of-schedule activation requests 44from the server. 45=== 46 47Review our mandatory 'schedule agent with cron' page: 48http://fusioninventory.org/documentation/agent/cron.html 49