fusioninventory-agent
fusioninventory-agent copied to clipboard
[wip] Inventory Linux and Windows crontasks
Hello, is this still a work in progress or is there any other way to retrieve crontabs ?
Thanks in advance ^^
It will be integrated in June for the version 2.7 ;)
Sorry if I'm a bit late here, but you're mixing directories with different kind of content here.
Those directories contains configuration files for cron daemon, defining cron tasks:
- /etc/cron.d
- /var/spool/cron
- /var/spool/cron/crontabs
Those directories contains scripts:
- /etc/cron.hourly
- /etc/cron.daily
- /etc/cron.weekly
- /etc/cron.monthly
Those scripts are actually executed by a crontab entry generally defined in /etc/crontab or /etc/anacrontab, such as: 01 * * * * root nice -n 19 run-parts --report /etc/cron.hourly 02 4 * * * root nice -n 19 run-parts --report /etc/cron.daily 22 4 * * 0 root nice -n 19 run-parts --report /etc/cron.weekly 42 4 1 * * root nice -n 19 run-parts --report /etc/cron.monthly
If you want to enumerate cron tasks stricto senso, you should not include the content of the last directory group. If you want to enumerate everything executed by cron, which is different, you should make a difference between a task (ie, run-parts executed every hour) and the command executed by this task (ie, the list of scripts present in /etc/cron.hourly)/