0

It does not seem that file I put to /etc/cron.hourly does not seem to work

It's called cron_hourly_homepage, so it does not seem that its filename issue. Ownership seems alright as well: -rwxr-xr-x

run-parts --test /etc/cron.hourly sees this file, run-parts --report /etc/cron.hourly can run it as well

Would like to get it fixed, so no crontab recommendations are necessary :D

● cron.service - Regular background program processing daemon
     Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2021-12-27 20:20:40 GMT; 1 day 23h ago
       Docs: man:cron(8)
   Main PID: 401 (cron)
      Tasks: 1 (limit: 4915)
        CPU: 9.213s
     CGroup: /system.slice/cron.service
             └─401 /usr/sbin/cron -f

Dec 29 17:19:01 raspberrypi CRON[9255]: (CRON) info (No MTA installed, discarding output)
Dec 29 17:19:01 raspberrypi CRON[9255]: pam_unix(cron:session): session closed for user root
Dec 29 18:17:01 raspberrypi CRON[9427]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Dec 29 18:17:01 raspberrypi CRON[9428]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)

1 Answers1

0

It is common to forget cron scripts are running without a shell and no environment context. Please see this answer

Dudi Boy
  • 4,551
  • 1
  • 15
  • 30