Hi, developers.
I’m using Ghost from source code and then I’m faced with “cron is not a function”.
How do I solve this error?
$ghost update --archive /home/ubuntu/ghost-5.118.1.tgz --force
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
+ sudo systemctl is-active ghost_www-swiftpanda-jp
✔ Checking system Node.js version - found v20.19.1
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking free space
✔ Checking for available migrations
✔ Checking for latest Ghost version
# 5.118.1
* 🌐 Updated Danish Translations (#22866) - Christian Schou Køster
* 🌐 Added Turkish translations for authentication (#22869) - echobilisim3421
* 🌐 Add Mongolian (mn) language translations for portal, search, comments, ghost, signup and newsletter (#22758) - Max
* 🌐 Updated Bulgarian translations (#22832) - Yovko Lambrev
* 🌐 Added pt-BR translations for missing string in ghost.json (#22813) - Alexandre "Lekler" Rodrigues
---
View the changelog for full details: https://github.com/tryghost/ghost/compare/v5.118.0...v5.118.1
✔ Fetched release notes
✔ Downloading and updating Ghost to v5.118.1
✔ Linking latest Ghost and recording versions
✔ Linking built-in themes
ℹ Removing old Ghost versions [skipped]
$ghost start
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
+ sudo systemctl is-active ghost_www-swiftpanda-jp
✔ Checking system Node.js version - found v20.19.1
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
+ sudo systemctl is-active ghost_www-swiftpanda-jp
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking systemd unit file
✔ Checking systemd node version - found v20.19.1
+ sudo systemctl start ghost_www-swiftpanda-jp
+ sudo systemctl stop ghost_www-swiftpanda-jp
✖ Starting Ghost: www-swiftpanda-jp
A GhostError occurred.
Message: Ghost was able to start, but errored during boot with: cron is not a function
Suggestion: journalctl -u ghost_www-swiftpanda-jp -n 50
Debug Information:
OS: Ubuntu, v20.04.6 LTS
Node Version: v20.19.1
Ghost Version: 5.118.1
Ghost-CLI Version: 1.27.0
Environment: production
Command: 'ghost start'
Additional log info available in: /home/ubuntu/.ghost/logs/ghost-cli-debug-2025-04-28T09_29_50_064Z.log
Try running ghost doctor to check your system for known issues.
You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
$ghost log
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
+ sudo systemctl is-active ghost_www-swiftpanda-jp
+ sudo systemctl reset-failed ghost_www-swiftpanda-jp
[2025-04-28 18:29:45] INFO Ghost database ready in 1.295s
[2025-04-28 18:29:46] WARN Missing mail.from config, falling back to a generated email address. Please update your config file and set a valid from address
[2025-04-28 18:29:47] WARN Theme translations file locales/ja.json not found.
[2025-04-28 18:29:47] WARN Theme translations falling back to locales/en.json.
[2025-04-28 18:29:47] INFO Invalidating assets for regeneration
[2025-04-28 18:29:48] INFO URL Service ready in 1559ms
[2025-04-28 18:29:48] INFO Adding offloaded job to the inline job queue
[2025-04-28 18:29:48] INFO Scheduling job mentions-email-report at 9 13 * * * *. Next run on: Mon Apr 28 2025 19:13:09 GMT+0900 (Japan Standard Time)
[2025-04-28 18:29:49] ERROR
NAME: InternalServerError
MESSAGE: cron is not a function
level: critical
TypeError: cron is not a function
at bootGhost (/var/www/swiftpandajp/versions/5.118.1/core/boot.js:583:32)
at validateCron (/var/www/swiftpandajp/versions/5.118.1/node_modules/bree/lib/job-validator.js:150:18)
at validate (/var/www/swiftpandajp/versions/5.118.1/node_modules/bree/lib/job-validator.js:270:64)
at Bree.add (/var/www/swiftpandajp/versions/5.118.1/node_modules/bree/lib/index.js:666:13)
at JobManager.addJob (/var/www/swiftpandajp/versions/5.118.1/node_modules/@tryghost/job-manager/lib/JobManager.js:292:23)
at Object.init (/var/www/swiftpandajp/versions/5.118.1/core/server/services/mentions-email-report/service.js:159:22)
at initServices (/var/www/swiftpandajp/versions/5.118.1/core/boot.js:357:29)
at async bootGhost (/var/www/swiftpandajp/versions/5.118.1/core/boot.js:547:9)
[2025-04-28 18:29:49] WARN Ghost is shutting down
[2025-04-28 18:29:49] WARN Ghost has shut down
[2025-04-28 18:29:49] WARN Your site is now offline
[2025-04-28 18:29:49] WARN Ghost was running for a few seconds
[2025-04-28 18:29:49] INFO Adding offloaded job to the inline job queue
[2025-04-28 18:29:49] INFO Scheduling job clean-expired-comped at 39 51 3 * * *. Next run on: Tue Apr 29 2025 03:51:39 GMT+0900 (Japan Standard Time)
[2025-04-28 18:29:49] INFO Adding offloaded job to the inline job queue
[2025-04-28 18:29:49] INFO Scheduling job clean-tokens at 26 19 8 * * *. Next run on: Tue Apr 29 2025 08:19:26 GMT+0900 (Japan Standard Time)
[2025-04-28 18:29:49] ERROR
MESSAGE: cron is not a function
TypeError: cron is not a function
at validateCron (/var/www/swiftpandajp/versions/5.118.1/node_modules/bree/lib/job-validator.js:150:18)
at validate (/var/www/swiftpandajp/versions/5.118.1/node_modules/bree/lib/job-validator.js:270:64)
at Bree.add (/var/www/swiftpandajp/versions/5.118.1/node_modules/bree/lib/index.js:666:13)
at JobManager.addJob (/var/www/swiftpandajp/versions/5.118.1/node_modules/@tryghost/job-manager/lib/JobManager.js:292:23)
at Object.scheduleExpiredCompCleanupJob (/var/www/swiftpandajp/versions/5.118.1/core/server/services/members/jobs/index.js:21:25)
at Object.init (/var/www/swiftpandajp/versions/5.118.1/core/server/services/members/service.js:177:20)
at async Promise.all (index 5)
[2025-04-28 18:29:49] ERROR
MESSAGE: cron is not a function
TypeError: cron is not a function
at validateCron (/var/www/swiftpandajp/versions/5.118.1/node_modules/bree/lib/job-validator.js:150:18)
at validate (/var/www/swiftpandajp/versions/5.118.1/node_modules/bree/lib/job-validator.js:270:64)
at Bree.add (/var/www/swiftpandajp/versions/5.118.1/node_modules/bree/lib/index.js:666:13)
at JobManager.addJob (/var/www/swiftpandajp/versions/5.118.1/node_modules/@tryghost/job-manager/lib/JobManager.js:292:23)
at Object.scheduleTokenCleanupJob (/var/www/swiftpandajp/versions/5.118.1/core/server/services/members/jobs/index.js:43:25)
at Object.init (/var/www/swiftpandajp/versions/5.118.1/core/server/services/members/service.js:180:20)
at async Promise.all (index 5)
[2025-04-28 18:29:49] INFO Bootstrap client was closed.