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. Twenty
  3. Twenty bug fix

Twenty bug fix

Scheduled Pinned Locked Moved Twenty
3 Posts 2 Posters 56 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.
  • creative567145C
    creative567145C
    creative567145
    wrote last edited by
    #1

    Hi Cloudron Team. There is a small bug in the package. So I have sent the details and the Fix (in order to make your work easier 🙂

    Here is everything:

    Summary

    The Twenty package never registers Twenty's background cron jobs. The official Docker image runs yarn command:prod cron:register:all on every start (entrypoint.sh), but the package's start.sh omits this step. As a result no cron-driven feature works: an IMAP/SMTP-connected mailbox hangs on "Importing" forever and never picks up new mail, and scheduled workflow runs, calendar sync, webhook renewals, and cleanup jobs all silently never run. There are no errors in the logs, which makes this very hard to notice.

    Verified on package 1.29.0 (Twenty 2.55.0); the same gap is present in the current master start.sh (1.30.0 / Twenty 2.56.1).

    Details

    • Official upstream packages/twenty-docker/twenty/entrypoint.sh calls yarn command:prod cron:register:all at every container start (skippable via DISABLE_CRON_JOBS_REGISTRATION=true). This registers ~32 BullMQ repeatable jobs in Redis (messaging import every minute, message list fetch every 5 minutes, ongoing-stale recovery hourly, workflow cron triggers, webhook renewal, cleanup jobs, etc.).
    • The package's start.sh does database init, cache:flush, upgrade, cache:flush, then starts supervisord. It never registers the cron jobs.
    • supervisor/twenty-server.conf runs node dist/main.js, which performs no cron registration in Twenty 2.x.
    • supervisor/twenty-worker.conf runs yarn worker:prod with DISABLE_CRON_JOBS_REGISTRATION=true, which is correct (matches upstream docker-compose) but only makes sense when the registration already happened.
    • The DISABLE_CRON_JOBS_REGISTRATION=false line that start.sh writes into /app/data/env is read by nothing in the package. The variable is only consumed by the upstream entrypoint, which the package replaces.
    • Net effect: the cron queue in Redis is empty forever. The worker consumes it fine, but no repeatable jobs exist to fire.

    Observed on a client install: a Gmail account connected via IMAP/SMTP shows "Importing" indefinitely. The one-time import jobs enqueued during account setup run, but every subsequent step of the sync state machine is driven by cron jobs, so the import freezes and incoming mail is never fetched. App logs since installation show zero cron-queue activity. Running the registration command manually fixes it immediately ("Cron job registration completed: 32 successful, 0 failed, 3 skipped").

    Fix

    Add the registration step to start.sh after the upgrade step, before starting supervisord:

    if grep -q '^DISABLE_CRON_JOBS_REGISTRATION=true' /app/data/env; then
        echo "==> Cron job registration disabled, skipping"
    else
        echo "==> Registering background cron jobs"
        gosu cloudron:cloudron yarn command:prod cron:register:all
    fi
    

    Registration is idempotent and cheap, so running it on every start matches upstream behavior. The DISABLE_CRON_JOBS_REGISTRATION=true on the worker in supervisor conf can stay as is.

    Workaround for affected installs

    Run once in the app's web terminal. The registered jobs persist in Redis across app restarts and updates; rerun only if the Redis addon is ever wiped.

    cd /app/code/packages/twenty-server
    gosu cloudron:cloudron yarn command:prod cron:register:all
    
    1 Reply Last reply
    3
    • jamesJ
      jamesJ
      james
      Staff
      wrote last edited by
      #2

      Hello @creative567145
      This should be fixed with package version 1.33.1
      Can you please check that and report back?

      1 Reply Last reply
      2
      • creative567145C
        creative567145C
        creative567145
        wrote last edited by
        #3

        thanks James @james I already performed the manual fix, so perhaps somebody else can test the fix performed via the update

        1 Reply Last reply
        1

        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