How do I enable the cron?

Asked by Danie de Jager on 2020-06-22

I see there is a cron under /etc/cron.daily/ for the ocsinventory-agent. It seems to enable the cron I must do something with

#ENABLED_FILE=$RUNDIR/ocsinventory-client-enabled

When I search on the device I do not find a file called ocsinventory-client-enabled. Must I just create an empty file called ocsinventory-client-enabled and put it somewhere on the device? The man document did not explain this.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ocsinventory-agent Edit question
Assignee:
No assignee Edit question
Solved by:
Danie de Jager
Solved:
2020-06-22
Last query:
2020-06-22
Last reply:
2020-06-22

From this:
https://www.apt-browse.org/browse/debian/wheezy/main/all/ocsinventory-agent/2:2.0.5-1/file/etc/cron.daily/ocsinventory-agent

It seems that the crontab gets enabled if the file exists. There is a check on the file. So if you run:

sudo touch $RUNDIR/ocsinventory-client-enabled
sudo chmod 444 $RUNDIR/ocsinventory-client-enabled

Then the crontab will run, otherwise it will not.

Danie de Jager (danie.dejager) said : #3

Oh. I see. The variables for RUNDIR and ENABLED_FILE is hashed but the check for PROG is true so it will execute PROG daily. Makes sense now. thanks

Just so you know... I have no idea about what any of this is. I wasn't even aware of the package before you asked this question or know what it does but I still found the answer just by searching the Web......