Cron scripts in /etc/cron.daily not running
If you put a script to be run by cron in cron.hourly, cron.daily, cron.weekly or cron.monthly but they won’t run, make sure that they:
- Are chmod +x
- Are owned by the correct user (like root:root)
- Start with #!/bin/sh or the corresponding shell used to execute them
- The filename doesn’t contain any dots, like a script name ending in .sh will not execute
You can also execute the command to verify that your script will be run:
run-parts –test /etc/cron.daily
Leave a Reply
Want to join the discussion?Feel free to contribute!