Twenty bug fix
-
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:allon 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.shcallsyarn command:prod cron:register:allat every container start (skippable viaDISABLE_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.confrunsnode dist/main.js, which performs no cron registration in Twenty 2.x.supervisor/twenty-worker.confrunsyarn worker:prodwithDISABLE_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=falseline that start.sh writes into/app/data/envis 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 fiRegistration is idempotent and cheap, so running it on every start matches upstream behavior. The
DISABLE_CRON_JOBS_REGISTRATION=trueon 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 - Official upstream
-
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