cron questions.

General support for the Pi-Star System
Post Reply
User avatar
W1FJM
Posts: 104
Joined: Sun May 20, 2018 10:46 pm

cron questions.

Post 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
Fran
W1FJM
User avatar
W1FJM
Posts: 104
Joined: Sun May 20, 2018 10:46 pm

Re: cron questions.

Post by W1FJM »

Thank you. I will give that a try.
Fran
W1FJM
User avatar
W1FJM
Posts: 104
Joined: Sun May 20, 2018 10:46 pm

Re: cron questions.

Post 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.
Fran
W1FJM
User avatar
W1FJM
Posts: 104
Joined: Sun May 20, 2018 10:46 pm

Re: cron questions.

Post by W1FJM »

Ah, good point. I have it all working now, Thanks for your help.
Fran
W1FJM
AF6VN
Posts: 821
Joined: Fri Jul 20, 2018 1:15 am

Re: cron questions.

Post 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.

--
AF6VN
Dennis L Bieber
Post Reply