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

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Nextcloud
  3. "Last job execution ran X days ago. Something seems wrong." with cron.

"Last job execution ran X days ago. Something seems wrong." with cron.

Scheduled Pinned Locked Moved Unsolved Nextcloud
9 Posts 4 Posters 36 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.
  • ei8fdbE Offline
    ei8fdbE Offline
    ei8fdb
    wrote last edited by ei8fdb
    #1
    Cloudron 9.0.17
    Nextcloud 32.0.6 / com.nextcloud.cloudronapp@5.6.7
    App was created....4-5? years ago
    

    Hello all, I hope you're all doing well.

    My Nextcloud install cron isn't running. I only realised when my RSS feeds weren't updating. This has been the case for maybe a month, or longer.
    Screenshot 2026-03-20 at 09.21.08.png

    • If I reboot the app, cron runs successfully.

    • I can run cron.sh manually:

    root@b9cb435f-94c7-497b-bedd-7eedf0a097e7:/app/code# /app/pkg/cron.sh 
    => Run cron job
    root@b9cb435f-94c7-497b-bedd-7eedf0a097e7:/app/code# 
    
    • I can run /app/pkg/cron.sh manually from web-ui terminal
    root@b9cb435f-94c7-497b-bedd-7eedf0a097e7:/app/code# /app/pkg/cron.sh 
    => Run cron job
    root@b9cb435f-94c7-497b-bedd-7eedf0a097e7:/app/code#
    
    • I can run /app/pkg/preview-cleanup.sh manually from web-ui terminal
    root@b9cb435f-94c7-497b-bedd-7eedf0a097e7:/app/code# /app/pkg/preview-cleanup.sh 
    => Run empty folder cleanup
    root@b9cb435f-94c7-497b-bedd-7eedf0a097e7:/app/code#
    
    • cron.sh contents looks "normal"
    #!/bin/bash
    echo "=> Run cron job"
    exec /usr/local/bin/gosu www-data:www-data php -f /app/code/cron.php
    
    • preview-cleanup.sh contents looks "normal"
    #!/bin/bash
    set -eu
    set -o pipefail
    echo "=> Run empty folder cleanup"
    cd /app/code/
    readonly instanceId=$(sudo -u www-data php occ config:system:get instanceid)
    cd /app/data/data/appdata_${instanceId}/preview/
    find . -type d -empty -delete
    
    • When I run cron.sh or preview-cleanup.sh, nothing is logged in /run/nextcloud/nextcloud.log - tail -f /run/nextcloud/nextcloud.log | grep cron.

    • I've read "cron job is automatically enabled in Cloudron. No need to do anything...".

    • Looking in the Cloudron app UI, I don't see any entries in the Nextcloud app crontab:
      165cb608-b2c7-45fe-b131-cd02b0cfcf65-image.jpeg

    I can't find any other applicable forum posts.

    I'm not sure where to go with things now. Any help most appreciated!

    Update
    Reading more about an app's crontab being managed from the Cloudron UI - is it possible that that possibility was brought by a recent update, and it's not been configured? Just a thought.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      joseph
      Staff
      wrote last edited by
      #2

      @ei8fdb so the warning does not go away even when you run the cron.sh manually?

      Nextcloud's cron is already in the package, there is no need to configure anything manually.

      1 Reply Last reply
      0
      • ei8fdbE Offline
        ei8fdbE Offline
        ei8fdb
        wrote last edited by
        #3

        Hiya @joseph,

        so the warning does not go away even when you run the cron.sh manually?

        No, the warning changes.

        Example:

        • Here is a screenshot from the Nextcloud admin section this morning:

        f2605a87-d17d-43fa-8e0c-51286e1d1b58-image.jpeg

        • Immediately after taking that, I then ran /app/pkg/cron.sh manually from web-ui terminal. Here is the same Nextcloud admin UI but the warning message has changed:

        85ae74fc-4e1d-4217-8d7a-245637ba8ec7-image.jpeg

        • After that (after about 30min due to meetings), I ran /app/pkg/preview-cleanup.sh manually from web-ui terminal, and here again is the same admin UI but with a different warning message:

        bd760880-8a6f-44d3-9ab4-612a7563a5d5-image.jpeg

        So, no the warning does not go away, the message text just changes.

        I don't know where to look to fix this issue, so I'd appreciate guidance. Thanks.

        1 Reply Last reply
        0
        • nebulonN Away
          nebulonN Away
          nebulon
          Staff
          wrote last edited by
          #4

          Ah so, if I get that right, running it manually does the job then and nextcloud picks up the run, but it then complains that no subsequent runs were done. Looks like the cron job is simply not run by the system automatically. The package does define two cron jobs:

              "scheduler": {
                "housekeeping": {
                  "schedule": "*/5 * * * *",
                  "command": "/app/pkg/cron.sh"
                },
                "previewcleanup": {
                  "schedule": "0 2 * * *",
                  "command": "/app/pkg/preview-cleanup.sh"
                }
              },
          

          So it looks like both didn't run automatically then. Maybe the scheduler got stuck. If you run systemctl restart box via SSH does the issue go away after some time?

          1 Reply Last reply
          0
          • ei8fdbE Offline
            ei8fdbE Offline
            ei8fdb
            wrote last edited by ei8fdb
            #5

            @nebulon thanks for the suggestion - the outcome:

            • Before I restarted box:
              105d1e4d-caff-48ca-afc1-f11b0d48b3a3-image.jpeg

            • I restarted it:

            Mar 23 12:21:24 box:box Received SIGTERM. Shutting down.
            Mar 23 12:21:24 box:platform uninitializing platform
            Mar 23 12:21:24 box:platform onDeactivated: stopping post activation services
            Mar 23 12:21:24 box:tasks stopAllTasks: 0 tasks are running. sending abort signal
            Mar 23 12:21:24 box:shell tasks: /usr/bin/sudo --non-interactive /home/yellowtent/box/src/scripts/stoptask.sh all
            Mar 23 12:21:24 box:database pool closed
            Mar 23 12:21:26 box:scheduler could not run task grav_scheduler : Database connection is already closed
            Mar 23 12:21:31 box:server ==========================================
            Mar 23 12:21:31 box:server Cloudron 9.0.17
            Mar 23 12:21:31 box:server ==========================================
            Mar 23 12:21:31 box:platform initialize: start platform
            Mar 23 12:21:31 box:tasks stopAllTasks: 0 tasks are running. sending abort signal
            Mar 23 12:21:31 box:shell tasks: /usr/bin/sudo --non-interactive /home/yellowtent/box/src/scripts/stoptask.sh all
            Mar 23 12:21:31 box:locks releaseAll: all locks released
            Mar 23 12:21:31 box:reverseproxy writeDashboardConfig: writing dashboard config for server.domain.tld
            Mar 23 12:21:31 box:shell reverseproxy: /usr/bin/sudo --non-interactive /home/yellowtent/box/src/scripts/restartservice.sh nginx
            Mar 23 12:21:31 box:platform onActivated: starting post activation services
            Mar 23 12:21:31 box:platform startInfra: checking infrastructure
            Mar 23 12:21:31 box:platform startInfra: infra is uptodate at version 49.9.0
            Mar 23 12:21:31 box:platform onInfraReady: platform is ready. infra changed: false
            Mar 23 12:21:31 box:apps schedulePendingTasks: scheduling app tasks
            Mar 23 12:21:31 box:apptaskmanager started
            Mar 23 12:21:31 box:cron startJobs: starting cron jobs with hour 16 and minute 14
            Mar 23 12:21:32 box:cron handleBackupScheduleChanged: schedule 00 00 0 * * 1,3,5,6 (UTC)
            Mar 23 12:21:32 box:cron autoupdatePatternChanged: pattern - 00 00 0,20 * * 0,2,4 (UTC)
            Mar 23 12:21:32 box:cron Dynamic DNS setting changed to false
            Mar 23 12:21:32 box:dockerproxy start: listening on AAA.BBB.CCC.DDD:3003
            Mar 23 12:21:40 box:shell metrics: lsblk -ndo PKNAME /dev/nvme0n1p1
            Mar 23 12:21:40 box:shell metrics: lsblk -ndo PKNAME /dev/nvme0n1
            Mar 23 12:21:40 box:apphealthmonitor app health: 22 running / 7 stopped / 0 unresponsive
            Mar 23 12:21:50 box:apphealthmonitor app health: 22 running / 7 stopped / 0 unresponsive
            Mar 23 12:22:00 box:docker deleteContainer: deleting 0a63e7db-16cd-440a-afb2-820cdefa5d38-wpcron
            Mar 23 12:22:00 at Object.createSubcontainer (/home/yellowtent/box/src/docker.js:466:28)
            Mar 23 12:22:00 at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
            Mar 23 12:22:00 box:scheduler sync: clearing jobs of 5193597b-558f-4d74-9186-b657e30daaa5 (EEE.BBB.CCC.DDD)
            Mar 23 12:22:00 box:docker deleteContainer: deleting 5193597b-558f-4d74-9186-b657e30daaa5-wpcron
            Mar 23 12:22:00 box:scheduler BoxError: (HTTP code 404) no such container - No such image: cloudron/org.wordpress.cloudronapp:202510010040410000
            Mar 23 12:22:00 at Object.createSubcontainer (/home/yellowtent/box/src/docker.js:466:28)
            Mar 23 12:22:00 at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
            Mar 23 12:22:00 box:scheduler sync: clearing jobs of 6c37cd48-0336-499f-a08a-cb25e007f997 (FFF.BBB.CCC.DDD)
            Mar 23 12:22:00 box:docker deleteContainer: deleting 6c37cd48-0336-499f-a08a-cb25e007f997-grav_scheduler
            Mar 23 12:22:00 box:scheduler createJobs: grav_scheduler (FFF.BBB.CCC.DDD) will run in container 6c37cd48-0336-499f-a08a-cb25e007f997-grav_scheduler
            Mar 23 12:22:00 box:scheduler sync: clearing jobs of 70474599-c3a6-4137-9508-52e612fbef0b (GGG.BBB.CCC.DDD)
            Mar 23 12:22:00 box:docker deleteContainer: deleting 70474599-c3a6-4137-9508-52e612fbef0b-cleanup
            Mar 23 12:22:00 box:apphealthmonitor app health: 22 running / 7 stopped / 0 unresponsive
            Mar 23 12:22:00 box:scheduler createJobs: cleanup (HHH.BBB.CCC.DDD) will run in container 70474599-c3a6-4137-9508-52e612fbef0b-cleanup
            Mar 23 12:22:00 box:scheduler sync: clearing jobs of 95b5ee39-c3a4-4a7d-b3fd-3272af36611e (III.BBB.CCC.DDD)
            Mar 23 12:22:00 box:docker deleteContainer: deleting 95b5ee39-c3a4-4a7d-b3fd-3272af36611e-runner
            Mar 23 12:22:00 box:scheduler createJobs: runner (III.BBB.CCC.DDD) will run in container 95b5ee39-c3a4-4a7d-b3fd-3272af36611e-runner
            Mar 23 12:22:00 box:scheduler sync: clearing jobs of 9f10974e-9dbe-4758-863f-0169e99ae572 (JJJ.CCC.DDD)
            Mar 23 12:22:00 box:docker deleteContainer: deleting 9f10974e-9dbe-4758-863f-0169e99ae572-daily
            Mar 23 12:22:00 box:scheduler createJobs: daily (JJJ.CCC.DDD) will run in container 9f10974e-9dbe-4758-863f-0169e99ae572-daily
            Mar 23 12:22:00 box:scheduler sync: clearing jobs of b9cb435f-94c7-497b-bedd-7eedf0a097e7 (BBB.CCC.DDD)
            Mar 23 12:22:00 box:docker deleteContainer: deleting b9cb435f-94c7-497b-bedd-7eedf0a097e7-housekeeping
            Mar 23 12:22:00 box:scheduler createJobs: housekeeping (BBB.CCC.DDD) will run in container b9cb435f-94c7-497b-bedd-7eedf0a097e7-housekeeping
            Mar 23 12:22:00 box:docker deleteContainer: deleting b9cb435f-94c7-497b-bedd-7eedf0a097e7-previewcleanup
            Mar 23 12:22:00 box:scheduler createJobs: previewcleanup (BBB.CCC.DDD) will run in container b9cb435f-94c7-497b-bedd-7eedf0a097e7-previewcleanup
            Mar 23 12:22:00 box:scheduler sync: clearing jobs of c86c9123-fe90-4d13-ab78-88a335f719c9 (KKK.CCC.DDD)
            Mar 23 12:22:00 box:docker deleteContainer: deleting c86c9123-fe90-4d13-ab78-88a335f719c9-grav_scheduler
            Mar 23 12:22:00 box:scheduler createJobs: grav_scheduler (KKK.CCC.DDD) will run in container c86c9123-fe90-4d13-ab78-88a335f719c9-grav_scheduler
            Mar 23 12:22:00 box:scheduler sync: clearing jobs of e53828b0-d65b-40e0-b67b-4c9bebcd30d8 (LLL.MMM.DDD)
            Mar 23 12:22:00 box:docker deleteContainer: deleting e53828b0-d65b-40e0-b67b-4c9bebcd30d8-wpcron
            Mar 23 12:22:00 box:scheduler createJobs: wpcron (LLL.MMM.DDD) will run in container e53828b0-d65b-40e0-b67b-4c9bebcd30d8-wpcron
            Mar 23 12:22:00 box:scheduler sync: clearing jobs of f475c3f3-8879-41bf-9021-095e80c40b84 (LLL.CCC.DDD)
            Mar 23 12:22:00 box:docker deleteContainer: deleting f475c3f3-8879-41bf-9021-095e80c40b84-wpcron
            Mar 23 12:22:00 box:scheduler BoxError: (HTTP code 404) no such container - No such image: cloudron/org.wordpress.cloudronapp:20240724-074652-5617a7125
            Mar 23 12:22:00 at Object.createSubcontainer (/home/yellowtent/box/src/docker.js:466:28)
            Mar 23 12:22:00 at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
            Mar 23 12:22:02 box:reverseproxy writeDefaultConfig: writing configs for endpoint "ip"
            Mar 23 12:22:02 box:shell reverseproxy: /usr/bin/sudo --non-interactive /home/yellowtent/box/src/scripts/restartservice.sh nginx
            Mar 23 12:22:02 box:platform onActivated: finished
            
            • Some time after box restart - ~10m - the warning message changes automatically:

            cf73f3ed-1c45-4f47-b469-85b87a837727-image.jpeg

            • Some time after box restart - ~15m - it looked like cron ran
            Mar 23 12:35:56 => Run cron job
            Mar 23 12:35:58 nextcloud.client.ip.address - - [23/Mar/2026:12:35:58 +0000] "GET /apps/news/feeds HTTP/1.1" 200 5811 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:147.0) Gecko/20100101 Firefox/147.0"
            Mar 23 12:36:00 - - - [23/Mar/2026:12:36:00 +0000] "GET /index.php/login HTTP/1.1" 200 27888 "-" "Mozilla (CloudronHealth)"
            Mar 23 12:36:10 - - - [23/Mar/2026:12:36:10 +0000] "GET /index.php/login HTTP/1.1" 200 27888 "-" "Mozilla (CloudronHealth)"
            
            • Since then, the admin UI looks like this:

            fe73a42a-85d8-43e3-9e05-71d8488c2f4a-image.jpeg

            And I cannot see any mention of cron running since then.

            And I'm very confused. 😕

            I'm using the RSS feed reader app as a secondary indicator of cron running, no feeds have been updated since ~12:35:56.

            1 Reply Last reply
            0
            • jdaviescoatesJ Offline
              jdaviescoatesJ Offline
              jdaviescoates
              wrote last edited by
              #6

              I have this:

              74b191ba-3a1f-43f5-a0c0-80b805898312-image.jpeg

              I don't think I've ever done anything to set it up.

              I use Cloudron with Gandi & Hetzner

              ei8fdbE 1 Reply Last reply
              0
              • jdaviescoatesJ jdaviescoates

                I have this:

                74b191ba-3a1f-43f5-a0c0-80b805898312-image.jpeg

                I don't think I've ever done anything to set it up.

                ei8fdbE Offline
                ei8fdbE Offline
                ei8fdb
                wrote last edited by ei8fdb
                #7

                @jdaviescoates said:

                I don't think I've ever done anything to set it up.

                Yep, since I created the app (years ago), I've not done anything with cron - it just worked.

                I can't identify what's changed, but I'm certain cron isn't running on a schedule.

                1 Reply Last reply
                1
                • nebulonN Away
                  nebulonN Away
                  nebulon
                  Staff
                  wrote last edited by
                  #8

                  If you just add a custom cron job to run every minute for that app just echoing to stdout as used as an example at https://docs.cloudron.io/apps#cron

                  Then have the logsviewer open, do you see the echoed messages every minute or what your custom schedule is?

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    joseph
                    Staff
                    wrote last edited by joseph
                    #9

                    There should be a periodic => Run cron job in your app logs . Do you see it? If not immediately, just keep the log window open for 20 mins, it will print every 5 mins.

                    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