Commit graph

22 commits

Author SHA1 Message Date
Kijin Sung
5e4b48f19b Prevent direct access to cron.php on CLI 2025-09-09 15:30:29 +09:00
Kijin Sung
bacf067f87 Implement graceful shutdown for background task runner #2451 2025-05-21 19:04:45 +09:00
Kijin Sung
9ca2f79dce Move all CLI scripts except common.cron to the "scripts" directory under the corresponding module 2025-05-21 18:07:04 +09:00
Kijin Sung
53cd6e807d Implement scheduled tasks 2024-12-12 00:49:18 +09:00
Kijin Sung
4ebaa6b0cb Display errors and OK message in webcron result page 2024-10-26 16:50:14 +09:00
Kijin Sung
e8c03318e4 Close session before webcron processing 2024-10-26 16:40:31 +09:00
Kijin Sung
f6a458f648 Add RXQUEUE_CRON constant to distinguish when cron is running 2024-10-10 23:43:04 +09:00
Kijin Sung
61b9f57196 Implement multiprocessing, and try to make webcron more resilient 2024-10-10 23:22:42 +09:00
Kijin Sung
097cecece8 Add code samples to Queue config screen 2024-10-10 23:04:35 +09:00
Kijin Sung
78bbc2ffa5 Initial structure of Queue system, with Redis driver 2024-10-09 22:59:08 +09:00
Kijin Sung
42d09bde65 Provide a single entry point for all command-line scripts
Core example:

php index.php common.clean_empty_dirs
  -> executes common/scripts/clean_empty_dirs.php

Third-party example:

php index.php module_name.script_name
  -> executes modules/module_name/scripts/script_name.php

This should be the preferred method of executing PHP scripts included with
any third-party module, because it ensures that the working environment is
correct. For example, it will set the current working directory to Rhymix root,
check that the UID matches the usual web user, include all core libraries and
initialize the Context properly.

Over time, we will expand the command-line functionality similar to
the 'artisan' command in Laravel.
2023-08-16 23:12:25 +09:00
Kijin Sung
911772393a Fix missing Context::init() in common script 2023-08-12 21:17:52 +09:00
Kijin Sung
4d4d454af0 Fix update_all_modules.php not calling all the update routines of the Install module 2023-08-11 01:38:28 +09:00
Kijin Sung
6e7012394e Emphasize NOT in the common script error message 2023-08-10 10:57:02 +09:00
Kijin Sung
7b39fac881 Fix some modules not being updated during initial install 2023-06-21 00:39:52 +09:00
Kijin Sung
f27ea1b666 Add script to update all modules from the CLI 2020-03-29 17:30:00 +09:00
Kijin Sung
6213708216 Provide script to delete message attachments older than X days 2019-11-22 20:06:10 +09:00
Kijin Sung
a228f0888b Add script to delete old logs 2018-11-20 15:31:34 +09:00
Kijin Sung
0dedc76107 Clear ncenterlite cache data after deleting old notifications 2018-01-17 13:14:53 +09:00
Kijin Sung
c724d72781 Break early if there are no more garbage files to clean 2017-01-27 15:16:46 +09:00
Kijin Sung
b767ff7a94 Add shell script to delete garbage files and discarded chunks 2017-01-27 15:15:32 +09:00
Kijin Sung
054191a69d Add some PHP-CLI scripts to be run as cronjobs 2017-01-26 21:29:22 +09:00