Skip to content

Commit

Permalink
MDL-77837 core: Improve usage docs for cron::setup_user
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Apr 6, 2023
1 parent 2dde341 commit 25f1ec5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/classes/cron.php
Expand Up @@ -573,7 +573,12 @@ public static function prepare_core_renderer($restore = false) {

/**
* Sets up a user and course environment in cron.
* Do not use outside of cron script!
*
* Note: This function is intended only for use in:
* - the cron runner scripts
* - individual tasks which extend the adhoc_task and scheduled_task classes
* - unit tests related to tasks
* - other parts of the cron/task system
*
* Please note that this function stores cache data statically.
* @see reset_user_cache() to reset this cache.
Expand Down

0 comments on commit 25f1ec5

Please sign in to comment.