Page 1 of 1
cron questions.
Posted: Fri Jul 23, 2021 4:09 pm
by W1FJM
1. where are the cron logs?
2. how do I setup a cron job to reboot my system a 3 am daily? I tried:
#reboot daily @ 3 am
0 3 * * * sudo reboot
but it didn't work.
Thanks
Re: cron questions.
Posted: Fri Jul 23, 2021 8:03 pm
by W1FJM
Thank you. I will give that a try.
Re: cron questions.
Posted: Sat Jul 24, 2021 2:38 pm
by W1FJM
KE7FNS the command you gave me didn't work.
I have been editing /etc/crontab.
I still don't find any cron logs anywhere. Andy, are there any? If so, where.
Re: cron questions.
Posted: Sat Jul 24, 2021 6:25 pm
by W1FJM
Ah, good point. I have it all working now, Thanks for your help.
Re: cron questions.
Posted: Sat Jul 24, 2021 6:48 pm
by AF6VN
KE7FNS wrote: ↑Fri Jul 23, 2021 6:14 pm
You should probably use:
Code: Select all
0 3 * * * root sudo /sbin/shutdown -r
If the user is
root, I suspect you don't need the "sudo" part of the command.