Apps cronjob runs multiple times even though it's not supposed to
-
I have a Managed WordPress app which I use for weekly disk usage stats. The cronjob looks like this:
0 14 * * SUN export root_space=$(df -h | grep '/$'); export root_usage=$(echo $root_space | awk '{ print int($5) }'); curl -H "Authorization: Bearer xyz" -H "Title: Weekly disk usage report" -H "Priority: low" -H "Tags: loudspeaker" -X POST --data "Servername disk usage: $root_usage%" https://ntfy.example.com/df-alert >/dev/null 2>&1I'm using the same thing on a few more servers and on those it is only sent only once, but this specific server usually runs twice, today even three times in a row. Where do I check if there are duplicates somewhere? Is there a global crontab which collects the apps' jobs?
App logs look like this:
Aug 16 14:00:10 => Run cron job Aug 16 14:00:11 Success: Executed a total of 0 cron events. Aug 16 14:00:19 {"id":"xxx","time":1786881619,"expires":1786924819,"event":"message","topic":"df-alert","title":"..." Aug 16 14:00:20 - - - [16/Aug/2026:12:00:20 +0000] "GET /wp-includes/version.php HTTP/1.1" 200 - "-" "Mozilla (CloudronHealth)" Aug 16 14:00:30 - - - [16/Aug/2026:12:00:30 +0000] "GET /wp-includes/version.php HTTP/1.1" 200 - "-" "Mozilla (CloudronHealth)" Aug 16 14:00:37 {"id":"yyy","time":1786881637,"expires":1786924837,"event":"message","topic":"df-alert","title":"..." Aug 16 14:00:40 - - - [16/Aug/2026:12:00:40 +0000] "GET /wp-includes/version.php HTTP/1.1" 200 - "-" "Mozilla (CloudronHealth)" Aug 16 14:00:43 {"id":"zzz","time":1786881643,"expires":1786924843,"event":"message","topic":"df-alert","title":"..." Aug 16 14:00:50 - - - [16/Aug/2026:12:00:50 +0000] "GET /wp-includes/version.php HTTP/1.1" 200 - "-" "Mozilla (CloudronHealth)"No idea why they run more than once and with that much delay in between. Any suggestions on where to check?
-
M msbt marked this topic as a regular topic
-
-
Hello @msbt
These are stored in the box database.
Example:mysql -h 127.0.0.1 -uroot -ppassword box -e " SELECT id, crontab from apps WHERE id='26514c2d-e91a-4dbb-bd5a-f862dcb4a6d2'\G" mysql: [Warning] Using a password on the command line interface can be insecure. *************************** 1. row *************************** id: 26514c2d-e91a-4dbb-bd5a-f862dcb4a6d2 crontab: # +------------------------ minute (0 - 59) # | +------------------- hour (0 - 23) # | | +-------------- day of month (1 - 31) # | | | +--------- month (1 - 12) # | | | | +---- day of week (0 - 6) (Sunday=0 or 7) # | | | | | # * * * * * command to be executed */5 * * * * "/app/data/public/tcl/get_all_members"
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login