From b1734fa8eac7d745499975747333d24b9bbc0226 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 24 Feb 2023 15:43:50 +0100 Subject: [PATCH] Update cronjob PIP - Showcase ``. - Explain that unnamed cronjobs are no longer supported. --- docs/migration/wsc55/php.md | 10 ++++++++++ docs/package/pip/cronjob.md | 6 +++--- snippets/package/pip/cronjob.xml | 8 ++------ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/docs/migration/wsc55/php.md b/docs/migration/wsc55/php.md index a15f0458..84ddba5e 100644 --- a/docs/migration/wsc55/php.md +++ b/docs/migration/wsc55/php.md @@ -299,6 +299,16 @@ The `name` attribute needs to be specified for all event listeners. Deleting unnamed event listeners still is possible to allow for a clean migration of existing listeners. +#### Cronjob + +Installing unnamed cronjobs is no longer supported. +The `name` attribute needs to be specified for all event listeners. + +Deleting unnamed cronjobs still is possible to allow for a clean migration of existing cronjobs. + +The cronjob PIP now supports the `` element, allowing to define the cronjob schedule using a full expression instead of specifying the five elements separately. + + #### Database The `$name` parameter of `DatabaseTableIndex::create()` is no longer optional. diff --git a/docs/package/pip/cronjob.md b/docs/package/pip/cronjob.md index 7c149c0b..647d5270 100644 --- a/docs/package/pip/cronjob.md +++ b/docs/package/pip/cronjob.md @@ -20,10 +20,10 @@ the class has to implement the `wcf\system\cronjob\ICronjob` interface. Provides a human readable description for the administrator. -### `` +### `` -All of the five `startMinute`, `startHour`, `startDom` (Day Of Month), `startMonth`, `startDow` (Day Of Week) are required. -They correspond to the fields in `crontab(5)` of a cron daemon and accept the same syntax. +The cronjob schedule. +The expression accepts the same syntax as described in [`crontab(5)`](https://linux.die.net/man/5/crontab) of a cron daemon. ### `` diff --git a/snippets/package/pip/cronjob.xml b/snippets/package/pip/cronjob.xml index 583b8a74..532b9895 100644 --- a/snippets/package/pip/cronjob.xml +++ b/snippets/package/pip/cronjob.xml @@ -5,13 +5,9 @@ wcf\system\cronjob\ExampleCronjob Serves as an example Stellt ein Beispiel dar - 0 - 2 - */2 - * - * + 0 2 */2 * * 1 1 - \ No newline at end of file + -- 2.20.1