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
  • 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

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Cronjob of Surfer App stopped?

Cronjob of Surfer App stopped?

Scheduled Pinned Locked Moved Solved Support
cron
10 Posts 2 Posters 1.4k Views 3 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.
  • KubernetesK Offline
    KubernetesK Offline
    Kubernetes
    App Dev
    wrote on last edited by girish
    #1

    Hello,

    one of my Apps (Surfer App) does have a cronjob configured to execute every minute a https "ping" to healthcheck.io

    * * * * * curl https://hc-ping.com/XXXXXXXX-0ad4-XXXXXX-bb0a-3XXXXXXXXX30

    That was running a few weeks without any problems, but since yesterday it seems the cronjob is not executed anymore.

    Are any issues similar to this known? I didn't really change anything - you know 😄

    After rebooting the Cloudron Server the cronjob seems to work again.

    Best,
    Michael

    1 Reply Last reply
    1
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      For good measure, maybe you should provide some curl timeouts. Maybe it is getting stuck? Currently, the logic will just not run cron again if the previous one did not complete.

      I think --connect-timeout and --max-time

      KubernetesK 1 Reply Last reply
      1
      • girishG girish marked this topic as a question on
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #3

        In that cron job, you can also prefix something like echo "==. Pinging healthcheck.io" && curl xxx . This way it will generate that statement in app logs.

        1 Reply Last reply
        2
        • girishG girish

          For good measure, maybe you should provide some curl timeouts. Maybe it is getting stuck? Currently, the logic will just not run cron again if the previous one did not complete.

          I think --connect-timeout and --max-time

          KubernetesK Offline
          KubernetesK Offline
          Kubernetes
          App Dev
          wrote on last edited by
          #4

          @girish maybe the reason, I don't see any timeouts between last successfull ping and the first missing one. But I will follow your recommendation and put in an echo for logging. Thanks!

          1 Reply Last reply
          0
          • KubernetesK Offline
            KubernetesK Offline
            Kubernetes
            App Dev
            wrote on last edited by
            #5

            @girish is there a way to restart the Cronjob "Manager" without rebooting the server? It happend again this morning that the Cronjob stopped running. In the logs I see a last echo, but no "OK" response after curl command execution. Still not sure why that happening.

            However I think it would be good to get a Notification if Cloudron Cronjob decides to stop Cronjobs for Containers?

            1 Reply Last reply
            0
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #6

              @Kubernetes systemctl restart box should restart the cron jobs as well. Server reboot is not required.

              1 Reply Last reply
              1
              • girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #7

                I have added a debug message now if a cron job is running too long - https://git.cloudron.io/cloudron/box/-/commit/c978e3b7ea60f86f3629cf4550f89924d5ead2c1 . Maybe you can apply this on your server to test what's going on.

                1 Reply Last reply
                1
                • KubernetesK Offline
                  KubernetesK Offline
                  Kubernetes
                  App Dev
                  wrote on last edited by
                  #8

                  Great, I have applied the debug message and restarted the box. I will let you know when the problem reoccurs.

                  1 Reply Last reply
                  0
                  • KubernetesK Offline
                    KubernetesK Offline
                    Kubernetes
                    App Dev
                    wrote on last edited by
                    #9

                    @girish
                    15 minutes ago the last ping arrived at healthcheck, but the logs show the last check misses an OK and there is no debug message?

                    2024-02-09T20:32:57.000Z Send Healthcheck
                    2024-02-09T20:33:57.000Z OK
                    2024-02-09T20:33:57.000Z Send Healthcheck
                    2024-02-09T20:34:57.000Z OK
                    2024-02-09T20:34:57.000Z Send Healthcheck
                    2024-02-09T20:35:57.000Z OK
                    2024-02-09T20:35:57.000Z Send Healthcheck
                    2024-02-09T20:36:57.000Z OK
                    2024-02-09T20:36:57.000Z Send Healthcheck
                    2024-02-09T20:37:57.000Z OK
                    2024-02-09T20:37:57.000Z Send Healthcheck
                    2024-02-09T20:38:57.000Z OK
                    2024-02-09T20:38:57.000Z Send Healthcheck
                    
                    1 Reply Last reply
                    0
                    • girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #10

                      So, "Send Healthcheck" and "OK" are printed before and after your cron ? If that's the case, looks like it didn't complete. If you do docker inspect , you will find a container there like crontab.0 or something which is your container. You can exec into it and ps and check if that curl is stuck.

                      1 Reply Last reply
                      1
                      • girishG girish has marked this topic as solved on
                      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