I'm running Arch ARM on a PogoPlug and want to execute a file every hour, the file when call directly runs fine (it is executable), for testing the file
/etc/cron.hourly/crontest
contains
#!/bin/bash
date >> /root/log
First I copied it to /etc/cron.daily but it wouldn't run, run-parts --test lists it as valid but nothing shows in the log file, then I created a crontab:
*/5 * * * * /etc/cron.hourly/crontest
To run it every 5 minutes while monitoring the logfile, it doesn't fire.
This is /etc/cron.d/0hourly
# Run the hourly jobs
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
01 * * * * root run-parts /etc/cron.hourly
and
journalctl -u cronie
just returns
-- Logs begin at Wed 1969-12-31 17:00:03 MST, end at Tue 2014-01-28 10:14:12 MST. --
So even though the PogoPlug doesn't have a rtc it has the correct time via ntp. What else can I do to debug cron / get it to run?
I'm tempted to just write a bash script that loops and sleeps x amount of seconds, but I'd rather figure this one out :-)
ps -ef
(maybe justps
with BusyBox) and see if cron is running.