Skip to content

How to run cronjobs? #152

Answered by withinboredom
Necriso asked this question in Q&A
Discussion options

You must be logged in to vote

You'd do a cronjob just like anything else:

php vendor/bin/console my:command

If you're using Docker, you can do the same from the host:

docker run --rm --name cron-job --network my-network my-image php vendor/bin/console my:command

--rm and --name would delete your logs, but ensures that exactly one is running at any given time. You can still get the logs depending on how you have logging set up on the host.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dunglas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants