I have been trying for a long to make the crontab entries to run, but it doesn't matter what Time / schedule I enter, it doesn't seem to work. I have confirmed my current time zone with
Here I am providing the script, as there is a suspicion regarding this
---
This is under **root** cron so privileges are not an issue.
#!/bin/sh
# Log file for updates
LOG_FILE="/var/log/alpine_weekly_update.log"
echo "--- $(date) ---" >> "$LOG_FILE"
echo "Starting Alpine Linux weekly update..." >> "$LOG_FILE"
apk update >> "$LOG_FILE" 2>&1
apk upgrade >> "$LOG_FILE" 2>&1
# &1 is to differentiate from a file name(str or int) but as a desctiptor, here it will redirect both the stderr,and stdout to the logfile
# Check for kernel updates:
if [ -f /var/run/reboot-required ]; then
echo "Reboot required after update. Rebooting Now" >> "$LOG_FILE"
reboot
fi
echo "Alpine Linux weekly update finished." >> "$LOG_FILE"
echo "-----------------" >> "$LOG_FILE"
----------------------------------------------------
Update:
After a whole day of troubleshooting with this deployment, I did not managed to figure out the fault, except that I had installed **Cornie** in that which is causing a conflict.
Synopsis:
- syslog-ng was running and logging (installed, not a default).
- crond was confirmed running (by rc-service crond status).
- crontab entry was valid and present for root.
- Ownership (chown), Mode (chmod) and UID, GID all are in favour of root in the Script, log and cron (cornie-service / crond)
- crond was NOT sending any CRON messages to syslog-ng, even after explicit restarts
- Installed and reinstalled Cornie, Deleted the .Pid files (/run/cronie.pid ; /var/run/cronie.pid)
----------------------------------------------------------
I spun off another alpine (3.21, previous was the same) and became very surprised by this --
Here I didn't install Cornie, but **no entry** on the crontab which had a **specific time** mentioned, did work. For example if I wanted to run each day 12:30AM (30 12 * * * /path/to/script).
However, when I put the schedule of running every minute (* * * * * /path/to/script) it ran properly. And I want to mention, that no declaration of path (PATH=) or Time zone / TZ (which was my primary suspicion) was provided, yet the each minute implementation was working. Furthermore I didnt even re-load the rc-services.
At this point I dont think there is any point going further, as most probably the busybox itself has some flaws or the cron has some other deep issues.
date
command & /etc/localtime
for the symbolic link.
How do I know that cron is not working?
My script calls $date (date and time or running) in it to print within the output log, but when I modify the crontab entry to a specific time, it doesn't reflect that time, only the time of last manual execution.
Furthermore, I know that the script does run as I have run it manually and verified the output log, so it's not due to triggering a script error. Yes, rc-service crond restart
has also been applied.
Someone, please suggest any avenue to investigate or troubleshoot further.
Here is my crontab entry, please ignore the 'weekly' naming.
Redacted timezone entries are Continent/Timezone

Asked by Neail
(79 rep)
Jun 21, 2025, 03:25 PM
Last activity: Jun 28, 2025, 07:17 AM
Last activity: Jun 28, 2025, 07:17 AM