How does cron service get restarted ?
-
I'm using cron package on latest pfSense 2.7.0-RELEASE.
From the GUI, I can go Services, Cron, and then add or edit the cron entries.
After clicking at Save, how do the changes get applied to the running cron service ?
Does the running service somehow reload the entries from /etc/crontab ?
Or do I need to restart the cron service manually with# service cron restart
Also, cron is not included in the pfSense GUI at Status, Services.
Should cron be included here, so the user can restart using the GUI instead of cli ? -
@bgroper said in How does cron service get restarted ?:
Also, cron is not included in the pfSense GUI at Status, Services.
A lot isn't visible in the GUI.
The real thing is here : console or SSH, menu option 8 and type
ps ax
Now you see the real thing.
You will also find this process :
90135 - Ss 0:01.25 /usr/sbin/cron -s
That's the one that wakes up every minutes and checks the /etc/crontab file for work to do.
it also checks /etc/cron.d/
And /etc/periodic/.....@bgroper said in How does cron service get restarted ?:
Does the running service somehow reload the entries from /etc/crontab ?
Or do I need to restart the cron service manually withWhat about this one :
Create a task, like a shell script file, that creates a file.
Make the cron entry in the GUI. Have it execute at (now + 5 minutes).
After 5 minutes : the file was created -
For some reason, I wrongly assumed that cron would only read the crontab file when the service re/started.
Thanks for the explanation, and the tips for how I could check this myself next time.
+1