diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-10-13 18:18:10 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-10-13 18:18:10 +0200 |
| commit | 4770dc276787edb1350d89d4ed77c194d33e1b25 (patch) | |
| tree | a6655b80194288320988e2849c37bc9384d5e464 /db | |
| parent | 02747d2a78939743e0c7606583bcc341566c7e79 (diff) | |
remove faulty cronjob and adjust name of correct cronjob that expires studygroups, fixes #5934
Closes #5934
Merge request studip/studip!4537
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrations/6.0.38_improved_studygroups.php | 5 | ||||
| -rw-r--r-- | db/migrations/6.0.53_rename_studygroup_expiration_cronjob.php | 21 | ||||
| -rw-r--r-- | db/studip-base-installation.sql | 2 | ||||
| -rw-r--r-- | db/studip-demo-installation.sql | 2 |
4 files changed, 25 insertions, 5 deletions
diff --git a/db/migrations/6.0.38_improved_studygroups.php b/db/migrations/6.0.38_improved_studygroups.php index 2ed7124..798efd9 100644 --- a/db/migrations/6.0.38_improved_studygroups.php +++ b/db/migrations/6.0.38_improved_studygroups.php @@ -157,9 +157,8 @@ class ImprovedStudygroups extends Migration // Add default cron tasks and schedules $new_job = [ - 'filename' => 'lib/cronjobs/studygroup_expiration.class.php', - 'class' => 'StudygroupExpirationJob', - 'priority' => 'normal' + 'filename' => 'lib/cronjobs/studygroup_expiration.php', + 'class' => StudygroupExpirationJob::class, ]; $query = "INSERT IGNORE INTO `cronjobs_tasks` diff --git a/db/migrations/6.0.53_rename_studygroup_expiration_cronjob.php b/db/migrations/6.0.53_rename_studygroup_expiration_cronjob.php new file mode 100644 index 0000000..e42bd8e --- /dev/null +++ b/db/migrations/6.0.53_rename_studygroup_expiration_cronjob.php @@ -0,0 +1,21 @@ +<?php +final class RenameStudygroupExpirationCronjob extends Migration +{ + public function description() + { + return 'Removes .class from registered cronjob filename that expires studygroups'; + } + + protected function up() + { + $query = "UPDATE `cronjobs_tasks` + SET `filename` = REPLACE(`filename`, '.class.php', '.php') + WHERE `class` = 'StudygroupExpirationJob'"; + DBManager::get()->exec($query); + } + + protected function down() + { + // No down migration since the filename was not right in the first place + } +} diff --git a/db/studip-base-installation.sql b/db/studip-base-installation.sql index a19e65d..4de0332 100644 --- a/db/studip-base-installation.sql +++ b/db/studip-base-installation.sql @@ -7873,7 +7873,7 @@ INSERT INTO `cronjobs_tasks` VALUES ('823875ed4a4b2e87baca0e5137243d96','lib/cronjobs/garbage_collector.php','GarbageCollectorJob',1,0,0,NULL,NULL), ('9c4ad2a8fe47d07e61475d25f5e539db','lib/cronjobs/send_mail_queue.php','SendMailQueueJob',1,0,0,NULL,NULL), ('9e6ef984f2bbf7f8010d4571678e28ce','lib/cronjobs/send_massmails.php','SendMassmailsJob',1,0,1,1754314729,1754314729), -('b44c160302451658c60ea8c4fc06db89','lib/cronjobs/studygroup_expiration.class.php','StudygroupExpirationJob',1,0,0,NULL,NULL), +('b44c160302451658c60ea8c4fc06db89','lib/cronjobs/studygroup_expiration.php','StudygroupExpirationJob',1,0,0,NULL,NULL), ('ca6df41746dbd2077d993d3bfddbf10c','lib/cronjobs/remind_oer_upload.php','RemindOerUpload',1,0,0,NULL,NULL), ('d19f37c382fec524b4fd51b3c5a1ada3','lib/cronjobs/send_mail_notifications.php','SendMailNotificationsJob',1,0,0,NULL,NULL); /*!40000 ALTER TABLE `cronjobs_tasks` ENABLE KEYS */; diff --git a/db/studip-demo-installation.sql b/db/studip-demo-installation.sql index 3d01436..74fd00d 100644 --- a/db/studip-demo-installation.sql +++ b/db/studip-demo-installation.sql @@ -7431,7 +7431,7 @@ INSERT INTO `cronjobs_tasks` VALUES ('2f2713671892bd9624fc27866cfd4630','lib/cronjobs/check_admission.php','CheckAdmissionJob',1,0,0,NULL,NULL), ('3428a64935e8c6a5ab5dcf5bf95fe556','lib/cronjobs/session_gc.php','SessionGcJob',1,0,0,NULL,NULL), ('43f9da3d9245d0f01b43f744e0b8cdce','lib/classes/FilesSearch/Cronjob.php','FilesSearch\\Cronjob',1,0,2,NULL,NULL), -('4b7f133f02418e9cc68c1a5a4213406f','lib/cronjobs/studygroup_expiration.class.php','StudygroupExpirationJob',1,0,0,NULL,NULL), +('4b7f133f02418e9cc68c1a5a4213406f','lib/cronjobs/studygroup_expiration.php','StudygroupExpirationJob',1,0,0,NULL,NULL), ('532b3fe76447dd85e10949a6fc5f3aa8','lib/cronjobs/cleanup_log.php','CleanupLogJob',1,0,0,NULL,NULL), ('59efbaf1e3dd0896df9a39f27f02e6c9','lib/cronjobs/send_massmails.php','SendMassmailsJob',1,0,1,1754314767,1754314767), ('5ecaecd21cd6dd3712d3d294de51c776','lib/cronjobs/import_ilias_testresults.php','ImportIliasTestresults',1,0,1,1716385357,1716385357), |
