111 Commits

Author SHA1 Message Date
Andrew Nicols
39f3b1ab66 MDL-77186 core: Move deprecated cron functions to deprecatedlib 2023-03-14 11:19:03 +08:00
Andrew Nicols
99a67b615f MDL-77186 core: Move cronlib to namespaced class 2023-03-13 21:21:13 +08:00
Andrew Nicols
1b59967d71 MDL-77186 core: Add a new keepalive setting to cron 2023-03-13 21:19:55 +08:00
Andrew Nicols
733e85487a MDL-77186 core: Improve coding style for cron_run() 2023-03-13 21:19:37 +08:00
Mikhail Golenkov
9e074f2436 MDL-74736 task: Log adhoc task id and its custom data 2022-06-22 10:33:25 +10:00
Mike Macgirvin
6770481c63 MDL-70568 cron: Temporarily increase debug level on task failure 2022-03-25 13:35:56 +11:00
David Mudrák
e6f4190203 MDL-70357 cron: Catch Throwables not just Exceptions when running tasks
Starting from PHP 7, most language errors throw Error exceptions. We
want to deal with those equally as with any other exception so we need
to catch all Throwables here.
2020-11-30 17:25:19 +01:00
Mikhail Golenkov
b465a541ae MDL-67211 Tasks: Record when a task is running.
Co-authored-by: Sam Marshall <s.marshall@open.ac.uk>
2020-08-25 17:08:03 +10:00
Andrew Nicols
834aba2309 MDL-68714 cron: Check value of CLI_SCRIPT not existence 2020-07-03 09:04:05 +08:00
Brendan Heywood
0b996db6a3 MDL-68714 task: Expose current task in cli process name 2020-07-01 18:35:32 +10:00
Jun Pataleta
8a34d36b56 Merge branch 'MDL-52846' of git://github.com/stronk7/moodle 2020-05-15 11:58:39 +08:00
Jake Dallimore
1516b80752 Merge branch 'MDL-68631' of https://github.com/jonof/moodle 2020-05-13 09:24:30 +08:00
Eloy Lafuente (stronk7)
d2ecc75e2f MDL-52846 tasks: complete docs and move functions to deprecatedlib
- Add MDL codes to @deprecated.
- Add @todo tag for future 4.3 phase 2 deprecation.
- Deprecate global scope functions:
  - cron_execute_plugin_type().
  - cron_bc_hack_plugin_functions().
  (moving them to deprecatelib).
- Document it in main upgrade.txt
2020-05-12 17:41:13 +02:00
Ankit Agarwal
3bdb8f4584 MDL-52846 tasks: Display developer notice for legacy cron 2020-05-12 17:38:08 +02:00
cescobedo
db15746c2d MDL-63580 core_task: Deprecation cron_run_single_task and run_from_cli
Also we have move the functions in \tool_task\run_from_cli to \core\task\manager
and we have deprecated that class.
2020-05-11 10:53:23 +02:00
Jonathon Fowler
4ac6c3d44e MDL-68631 cron: ensure the cron user is reset between scheduled tasks 2020-05-07 13:26:23 +10:00
Brendan Heywood
b15c53f4fa MDL-59594 cron: Allow graceful exit of cron and adhoc task cli's 2020-01-12 01:24:03 +11:00
Andrew Nicols
217a9b1ca0 Merge branch 'master_MDL-67485' of https://github.com/golenkovm/moodle 2020-01-09 12:39:28 +08:00
Mikhail Golenkov
6b2e15f6c5 MDL-67485 task: Release the task runner lock before throwing exception. 2020-01-09 14:29:58 +11:00
Andrew Nicols
452f568dca Merge branch 'MDL-67596-cron-ramp-up' of https://github.com/brendanheywood/moodle 2020-01-09 08:11:10 +08:00
Brendan Heywood
286cc88c8c MDL-67596 cron: Allow runners to ramp up instantly 2020-01-08 15:03:56 +11:00
Mikhail Golenkov
1d0b74b2a3 MDL-64610 task: Add support for per-task concurrency limits. 2020-01-02 16:05:47 +11:00
Mikhail Golenkov
4234159ecd MDL-67433 tool_task: Add limits to adhoc CLI runner. 2019-12-18 11:58:43 +11:00
Brendan Heywood
4e7dcd01a8 MDL-66927 cron: Process new adhoc tasks immediately 2019-10-16 20:25:02 +11:00
Eloy Lafuente (stronk7)
7dc5cae795 Merge branch 'MDL-64454-master' of https://github.com/sammarshallou/moodle 2019-02-06 22:26:44 +01:00
Andrew Nicols
23d6756256 MDL-64347 task: Add restrictions to scheduled task runner 2019-01-16 17:20:25 +08:00
Andrew Nicols
24bfd53c73 MDL-64347 task: Add restrictions to adhoc task runner 2019-01-16 17:20:25 +08:00
Andrew Nicols
4b71596fc9 MDL-49399 task: Add task logging API 2019-01-16 12:14:25 +08:00
sam marshall
b18034ed67 MDL-64454 Admin: Warning if cron does not run frequently
There is an existing warning if cron doesn't run at all (hasn't run
for 24 hours). This commit adds a warning if cron hasn't run for 3
minutes, based on the recommendation that cron should run every
minute.
2019-01-14 17:07:36 +00:00
Andrew Nicols
cd305dc26b MDL-61800 task: Reset the OUTPUT and PAGE on execution 2018-05-02 11:57:13 +08:00
Andrew Nicols
7e4c4b6f1f MDL-59084 core: Allow adhoc tasks to run as a specified user 2017-09-12 21:58:50 +08:00
sam marshall
6d7c06a990 MDL-59096 Tasks: Web running local plugin scheduled tasks fails 2017-06-02 17:06:28 +01:00
sam marshall
38fa1ca558 MDL-55980 Scheduled tasks: Run individual scheduled tasks from web 2017-02-24 10:42:28 +00:00
sam marshall
b9dba4e3aa MDL-51330 Cron: In log, scheduled tasks don't show component 2015-09-07 18:40:05 +01:00
Dan Poltawski
a6e9c23016 MDL-51109 task: more debug info for failed scheduled tasks 2015-09-01 10:59:55 +01:00
Michael Aherne
5ea1e1110f MDL-50009 cron: Prevent tasks from leaving uncommitted transactions 2015-04-29 09:39:07 +01:00
Andrew Nicols
371bfca1c4 MDL-48224 cron: Buffer SMTP connections around tasks 2014-12-12 10:35:54 +08:00
Damyon Wiese
309ae8921f MDL-25499: Centralise management of all types of cron tasks
Centralise management of all types of cron tasks with registration, scheduling,
parallel task conflicts(blocking) and running once off tasks, all using an
administration screen.

This is a combination of several issues:

MDL-25502: Added "black magic" task allocator for cron
MDL-25503: Add step to cron to run all scheduled tasks
MDL-25504 cron: Refactor to use scheduler
MDL-25505: Add an admin interface to schedule tasks via cron.
MDL-25507: Add support for adhoc tasks.
2014-02-26 12:03:46 +08:00
Sam Hemelryk
2ef8ff9e05 MDL-44315 phpdoc: fixed up typos and made up tags 2014-02-24 09:13:31 +13:00
Petr Škoda
fd0e019286 MDL-42541 stop using events for porfolion cron 2014-02-13 12:09:24 +08:00
Petr Škoda
62c8032509 MDL-34347 remove all problematic global text caching
Instead we will create new MUC caches inside each filter plugin.
Please note that all cache filters should work with local caches
without the need of strict cache invalidation.
2014-01-14 10:49:23 +08:00
Andrew Nicols
fd2dcaa603 MDL-43451 Cron: Retrieve additional name fields when creating passwords 2013-12-31 13:45:14 +08:00
Russell Smith
038f546777 MDL-41198 lib: Allow PHP to generate random seed on script start
Most srand instances are removed to allow PHP to do the work.

srand was left for group randomization due to the method used.
2013-12-18 16:45:34 +11:00
sam marshall
3ef7279f26 MDL-42084 Core: Change set_time_limit to core_php_time_limit::raise everywhere
Exceptions (places where set_time_limit is still left) are:

Third-party libraries:
  ADODB
  PHPMailer

Moodle core:
  PHPUnit - not relevant (CLI mode)
2013-11-06 16:40:01 +00:00
Damyon Wiese
18ef6201c0 Merge branch 'passwordreset-2013-10-07-1031Z' of https://github.com/peterbulmer/moodle
Conflicts:
	lib/db/install.xml
	lib/db/upgrade.php
	version.php
2013-10-08 10:30:57 +08:00
Petr Škoda
e87214bda7 MDL-42078 multiple uninstall improvements and cleanup
Includes:
* update checker refactored to \core\update\ namespace
* plugininfo classes refactored to \core\plugininfo\ namespace
* plugin_manager renamed to core_plugin_manager
* redirect back to original page after plugin uninstall
* fixed assign subplugin uninstall
* move assign subplugins under the assignment in admin tree
* fixed plugininfo for all question related plugin types
* auth uninstall support
* added missing block dependencies
* added theme uninstall
* subplugin types are following the plugin on plugin overview page
* several performance improvements in plugin manager
* new warnigns when plugininfo are outdated or missing
* multiple fixes and other improvements
2013-10-07 13:10:36 +02:00
Peter Bulmer
92de749fc7 MDL-23692 forgotpw: Simplify forgotpw process. 2013-10-04 22:37:56 +13:00
Petr Škoda
d79d5ac276 MDL-31501 rework user session architecture
List of changes:
 * New OOP API using PHP namespace \core\session\.
 * All handlers now update the sessions table consistently.
 * Experimental DB session support in Oracle.
 * Full support for session file handler (filesystem locking required).
 * New option for alternative session directory.
 * Official memcached session handler support.
 * Workaround for memcached version with non-functional gc.
 * Improved security - forced session id regeneration.
 * Improved compatibility with recent PHP releases.
 * Fixed borked CSS during install in debug mode.
 * Switched to file based sessions in new installs.
 * DB session setting disappears if DB does not support sessions.
 * DB session setting disappears if session handler specified in config.php.
 * Fast purging of sessions used in request only.
 * No legacy distinction -  file, database and memcached support the same functionality.
 * Session handler name included in performance info.
 * Fixed user_loggedin and user_loggedout event triggering.
 * Other minor bugfixing and improvements.
 * Fixed database session segfault if MUC disposed before $DB.

Limitations:
 * Session access time is now updated right after session start.
 * Support for $CFG->sessionlockloggedinonly was removed.
 * First request does not update userid in sessions table.
 * The timeouts may break badly if server hosting forces PHP.ini session settings.
 * The session GC is a lot slower, we do not rely on external session timeouts.
 * There cannot be any hooks triggered at the session write time.
 * File and memcached handlers do not support session lock acquire timeouts.
 * Some low level PHP session functions can not be used directly in Moodle code.
2013-09-21 13:11:56 +02:00
Rajesh Taneja
2b503e40f2 MDL-31560 Messages: Deprecated generate_email_supportuser
generate_email_supportuser was not creating user which can
be used by messaging system. core_user::get_support_user()
should be used to get support_user record.
2013-09-13 16:13:26 +08:00
Tim Gus
c4012e7e82 MDL-38570 admin: fix cron_delete_from_temp on windows 2013-09-12 11:33:32 +08:00