From d28c4e9f339297797d12e626d6e96d53e5605494 Mon Sep 17 00:00:00 2001 From: Crypta Eve Date: Mon, 29 Jan 2024 21:37:01 +1030 Subject: [PATCH] fix: update old default cron to be valid (#664) --- .../Configuration/ScheduleController.php | 2 +- ...024_01_22_191028_fix_invalid_schedules.php | 53 +++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 src/database/migrations/2024_01_22_191028_fix_invalid_schedules.php diff --git a/src/Http/Controllers/Configuration/ScheduleController.php b/src/Http/Controllers/Configuration/ScheduleController.php index 007c13506..f59d1d736 100644 --- a/src/Http/Controllers/Configuration/ScheduleController.php +++ b/src/Http/Controllers/Configuration/ScheduleController.php @@ -51,7 +51,7 @@ public function listSchedule() 'every minute' => '* * * * *', 'every five minutes' => '*/5 * * * *', 'every ten minutes' => '*/10 * * * *', - 'every thirty minutes' => '0/30 * * * *', + 'every thirty minutes' => '*/30 * * * *', ]; diff --git a/src/database/migrations/2024_01_22_191028_fix_invalid_schedules.php b/src/database/migrations/2024_01_22_191028_fix_invalid_schedules.php new file mode 100644 index 000000000..712b5b357 --- /dev/null +++ b/src/database/migrations/2024_01_22_191028_fix_invalid_schedules.php @@ -0,0 +1,53 @@ +where('expression', '0/30 * * * *') + ->update([ + 'expression' => '*/30 * * * *', + ]); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +}