1. Note down all the cron jobs for all users including root, for example:
To list the root's crontab
sudo crontab -l
To list your crontab
crontab -l
2. Delete the crontab complete for all users using the following
To delete the root's crontab
sudo crontab -r
To delete your crontab
crontab -r
3. Restart the system
4. Place your jobs back into the cron (Preferably the root's cron) either by creating a text file then pointing cron to that file or manually.
To set up manually
sudo crontab -e
To point cron to a text file
sudo crontab <filename>
Logically, preferably entered in the order of occurance. For example if you have a job that runs before another (in time) place that above.
Remember that the cron file or crontab must have entries in the following format
m h dom mon dow full path command
For example shutdown at 2:30PM ever day of week except weekends would be
30 14 * * 2,3,4,5,6 /sbin/shutdown
Another example run a script file (test.sh - located in /usr/local/myScripts folder) every monday at 2:00AM would be
0 2 * * 2 /usr/local/myScripts/test.sh
I had the same problem with cron, once and I remember reading in a forum that we need to delete the user's cron and restart the system then recreate it.
I had similar with a fresh UbuntuDDE install. I found answers in various sources (this one is probably the most relevant Ubuntu 18.04 - Dell XPS13 9370 no longer suspends on lid close). The issue is the laptop not going into "deep" sleep. Run this command
cat /sys/power/mem_sleep
And if you get the result below, then this is the issue.
[s2idle] deep
To change it, edit your grub file to add this text to the GRUB_CMDLINE_LINUX_DEFAULT line
mem_sleep_default=deep
Then update grub
sudo update-grub
and reboot. After reboot, run this again
cat /sys/power/mem_sleep
and confirm now that your result is
s2idle [deep]
Then you should be good to go.
Best Answer
Adding
GRUB_CMDLINE_LINUX="acpi_sleep=nonvs"
to/etc/default/grub
and then runningsudo update-grub
seemed to fix the problem.