Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Apps cronjob runs multiple times even though it's not supposed to

Apps cronjob runs multiple times even though it's not supposed to

Scheduled Pinned Locked Moved Support
cronwordpress app
6 Posts 2 Posters 118 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    msbt
    App Dev
    wrote last edited by msbt
    #1

    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>&1

    I'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?

    Happy Hosting & Web Development

    1 Reply Last reply
    0
    • M msbt marked this topic as a regular topic
    • jamesJ Online
      jamesJ Online
      james
      Staff
      wrote last edited by
      #2

      Hello @msbt
      Just to make sure, you are using the cron settings from the Cloudron dashboard, correct?

      M 1 Reply Last reply
      0
      • jamesJ james

        Hello @msbt
        Just to make sure, you are using the cron settings from the Cloudron dashboard, correct?

        M Offline
        M Offline
        msbt
        App Dev
        wrote last edited by
        #3

        @james exactly, app configuration -> cron. is there a place where all those cronjobs are collected to see if there are duplicate entries?

        Happy Hosting & Web Development

        1 Reply Last reply
        0
        • jamesJ Online
          jamesJ Online
          james
          Staff
          wrote last edited by
          #4

          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"
          
          1 Reply Last reply
          0
          • M Offline
            M Offline
            msbt
            App Dev
            wrote last edited by
            #5

            @james thanks, looks okay in there. I'll do some more investigating, I just set a different time and it got only triggered once. Any idea why it might be doing it multiple times at 14:00?

            Happy Hosting & Web Development

            1 Reply Last reply
            1
            • jamesJ Online
              jamesJ Online
              james
              Staff
              wrote last edited by
              #6

              Hello @msbt
              No idea yet.

              1 Reply Last reply
              0

              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
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Bookmarks
              • Search