1

I am very new to Linux world, so please excuse if I am saying / asking anything stupid...

I am using my old Ubuntu laptop to run a server and I am trying to suspend the system at night for 8 hrs, so that my laptop doesn't burn out. So I tried my hands on crontab for the for the first time. I used the below command to edit crontab

sudo crontab -e

and inside the crontab file, the following command was placed (this is the only line in the crontab file):

22 18 * * * sudo rtcwake -m -disk -s 100

PS: I had tried with 100 instead for 28800 to test the cron job

With this, I see that the system goes on stand by as expected and wakes back up after 100s. But the problem is after the reboot, the same command gets executed again. i.e. the system sleeps and wakes back up after another 100s, a second time. I am not able to figure out why its running twice. Can someone please help?

Santh82
  • 11
  • 1
  • Not sure, but it's possible crontab will see that it slept through an invocation, and then runs the command it missed... I would make it run a command and in the command log the time before and after invocation to see if I can see what's happening. – Dagelf Oct 05 '20 at 09:28

0 Answers0