From ae7dc9cf78ca905653a2cb7d8b3e1bb466e37979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Sch=C3=B6nfeld?= Date: Mon, 16 Sep 2024 11:41:18 +0200 Subject: [PATCH] cronjobs added --- Writerside/c.tree | 1 + Writerside/topics/Cronjobs.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Writerside/topics/Cronjobs.md diff --git a/Writerside/c.tree b/Writerside/c.tree index 6571c25..5715f4c 100644 --- a/Writerside/c.tree +++ b/Writerside/c.tree @@ -9,6 +9,7 @@ + diff --git a/Writerside/topics/Cronjobs.md b/Writerside/topics/Cronjobs.md new file mode 100644 index 0000000..106772c --- /dev/null +++ b/Writerside/topics/Cronjobs.md @@ -0,0 +1,22 @@ +# Cronjobs + +## Running regular cronjobs +Crons are run by executing the CronCommand from the command line. +By default this will run all available cronjobs not run in the last 23 hours. + +```bash + bin/console commsy:cron:main +``` + +## How cronjobs are processed +Running a cron will dispatch an async message, that will be picked up +by a runner and finally performed. +If a job is successfull another message is dispatched to update the last +run in the cron table. + +```mermaid +graph TB + A[Cron execution] -- dispatch --> B([CronTaskRun Message]) + B -- handled by --> C(Message Worker) + C -- dispatch --> D([CronTaskFinished Message]) +``` \ No newline at end of file