If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.
A DDEV add-on that runs scheduled cron jobs in the web container using Supercronic.
Unlike the system cron daemon, Supercronic inherits the full container
environment — DDEV variables like IS_DDEV_PROJECT, database credentials, and
TYPO3_CONTEXT are automatically available to every job without any inline
exports.
ddev add-on get astehlik/ddev-supercronic
ddev restart
Add one or more *.cron files to .ddev/web-build/. Each file uses standard
crontab syntax (no username column).
On ddev start, all .ddev/web-build/*.cron files are concatenated into a
single crontab and executed by Supercronic inside the web container.
An example job is provided at .ddev/web-build/time.cron.example. Rename it to
activate it:
mv .ddev/web-build/time.cron.example .ddev/web-build/time.cron
ddev restart
After at least a minute, ./time.log should appear in your project root
containing the current time written by the example job.
Because Supercronic inherits the container environment, IS_DDEV_PROJECT and
similar variables do not need to be set explicitly in cron files.
* * * * * cd /var/www/html && vendor/bin/typo3 scheduler:run
Feel free to contribute own working examples for other systems.
ddev exec cat /etc/supercronic/crontab.ddev ssh to run commands manually..ddev/config.yaml.This add-on is a drop-in replacement for
ddev/ddev-cron. Both use the same
.ddev/web-build/*.cron file format and location, so existing cron files work
without any changes.
ddev add-on remove ddev/ddev-cron
ddev add-on get astehlik/ddev-supercronic
ddev restart
Because Supercronic inherits the full container environment, any
IS_DDEV_PROJECT=true or other explicit env var prefixes in your cron commands
are no longer necessary, though leaving them in place is harmless.
ddev add-on remove astehlik/ddev-supercronic
The add-on version tracks the Supercronic version it ships. A GitHub Actions workflow checks for new Supercronic releases every Monday and opens a pull request with the update.
If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.