Why putting a script in /etc/cron.hourly is not working?

As you’ve probably seen in the comments to your question, the cronjobs in /etc/cron.hourly (and the other, similar directories) are executed by run-parts. run-parts is a little picky about filenames. By default it doesn’t execute files whose filenames contain anything other than (all of those from ASCII)

  • uppercase letters
  • lowercase letters
  • digits
  • underscores
  • dashes (“minus signs”)

So if your script has a filename of for example “myscript.sh”, it just is ignored, because run-parts does not like the dot.

Source: Why putting a script in /etc/cron.hourly is not working? – Ask Ubuntu

LOL!