Cron does not work specifing time
-
Is there any reason because when I specfy time cron does not work?
-
* * * * root /usr/bin/touch /root/scripts/lastexe
works
25 15 * * * root /usr/bin/touch /root/scripts/lastexe
does not
-
-
What are you expecting that second entry to do? It would run once per day at 3:25 PM.
-
@jimp said in Cron does not work specifing time:
What are you expecting that second entry to do? It would run once per day at 3:25 PM.
Right... but It does not.
this is what I have found out today
[2.4.4-RELEASE][admin@pfsLazzarini.localdomain]/root/scripts: ls -l
total 5
-rw-r--r-- 1 root wheel 0 May 6 20:48 lastexe20:48.... I do not know....
-
What does the entry look like in
/etc/crontab
?Is this bare metal hardware or a VM? Is the clock OK on there? Time zone?
-
it is a VM
[2.4.4-RELEASE][admin@pfsLazzarini.localdomain]/root/scripts: date
Fri May 8 00:09:26 CEST 2020 -
@vielfede said in Cron does not work specifing time:
-rw-r--r-- 1 root wheel 0 May 6 20:48 lastexe
I'm certainly no expert but doesn't it need to be executable?
chmod 744 /root/scripts/lastexe
-
@biggsy said in Cron does not work specifing time:
I'm certainly no expert but doesn't it need to be executable?
In this example
/usr/bin/touch
is the executable being run,/root/scripts/lastexe
is a parameter. -
@vielfede said in Cron does not work specifing time:
it is a VM
[2.4.4-RELEASE][admin@pfsLazzarini.localdomain]/root/scripts: date
Fri May 8 00:09:26 CEST 2020Being in a VM could mean the time is even worse than usual. Also you're on 2.4.4, should be on 2.4.5.
A couple other things: Make sure the Hypervisor clock is OK, and if this is ESX, (a) make sure that ESX is up-to-date and a current supported version (e.g. 6.7), (b) make sure the VM hardware support has been updated to the highest level supported by the hypervisor, (c) make sure the OS type configured in the VM settings matches the pfSense version installed, and (d) make sure that Open-VM-Tools is installed and up-to-date.