moodle task lock

  • No suggested jump to results
  • Notifications

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task usersync returned a "cannot optain task lock" #1132

@RSickenberg

RSickenberg commented Aug 12, 2019 • edited

@mmulrthelp

mmulrthelp commented Aug 12, 2019

Sorry, something went wrong.

RSickenberg commented Aug 12, 2019

@jamesmcq

jamesmcq commented Aug 13, 2019

Mmulrthelp commented aug 13, 2019.

@RSickenberg

No branches or pull requests

@jamesmcq

Documentation

Managing scheduled tasks

An administrator can schedule routine tasks very precisely from Administration > Site administration > Server > Tasks > Scheduled tasks.

Note that you still need to run the cron scripts (admin/cli/cron.php or https://yoursite/admin/cron.php ) at regular intervals. It is recommended that the cron is run every minute.

Clicking the edit icon allows the administrator to specify the minute/hour/day/month or day of the week the task is to be run. It is also possible to reset the task to its default setting or disable it completely.

The column 'Next run' provides information on whether a plugin or a task is disabled (as well as the date that a task will next run).

Format for scheduling tasks

When typing into the fields, the format is the same as for Unix cron. Examples are as follows and are according to which field you are editing:

Default: R means that a random value is picked when saving changes. This helps to distribute tasks more equally instead of running too many of them on the hour, midnight etc.

If you're trying to debug a cron task, you may notice the Fail Delay becomes populated with a number. This is the time in seconds the cron will delay running the task. To sidestep this problem for development purposes, take a look at the Scheduled Tasks section here: Administration_via_command_line#Scheduled_tasks .

Running individual tasks

To be able to run individual scheduled tasks via 'Run now' links on the scheduled tasks page, 'Allow 'Run now' for scheduled tasks' (tool_task | enablerunnow) in Site administration / Security / Site security settings should be enabled AND 'Path to PHP CLI' (pathtophp) in Site administration / Server / System paths should be set.

examplescheduledtasks.png

Tasks running now

Currently running tasks may be viewed from Site administration > Server > Tasks >Tasks running now

TasksRunningNow.png

Launching a task from CLI

You can also launch individual task from Command Line Interface (see Administration via command line ).

Powered by MediaWiki

IMAGES

  1. [MDL-67485] Release the task runner lock before throwing exception

    moodle task lock

  2. Moodle task

    moodle task lock

  3. Moodle Lock Download THE Selected SEQs Sub

    moodle task lock

  4. Moodle Task 1: What is my Learning Style?

    moodle task lock

  5. Learning Modules

    moodle task lock

  6. Moodle in English: taskchain files not available

    moodle task lock

VIDEO

  1. bicycle lock crack easy task

  2. moodle task 6

  3. Moodle Cloud Task 1

  4. Restricting Moodle Resources and Activities

  5. Toggle on Moodle

  6. biggboss Tamil 6

COMMENTS

  1. Moodle in English: Cannot obtain task lock

    Re: Cannot obtain task lock - qtype_random\task\remove_unused_questions) by Christophe BOITEUX - Wednesday, 11 September 2019, 8:16 PM. For me, to unblock (cron.php) the situation on the serveur : ps aux | grep php for obtain the list of processes. a = show processes for all users. u = display the process's user/owner.

  2. Task usersync returned a "cannot optain task lock" #1132

    'Execute scheduled task: Sync users with Azure AD. (local_o365\task\usersync) Cannot obtain task lock' Previously we've managed to get around this by rebooting the server, but that was when we encountered it on our DEV site. This is no longer a viable option. We are running Moodle 3.6.3 with local_o365 version 3.6.0.0 : 2018120300

  3. Scheduled tasks

    It is also possible to reset the task to its default setting or disable it completely. The column 'Next run' provides information on whether a plugin or a task is disabled (as well as the date that a task will next run). Format for scheduling tasks. When typing into the fields, the format is the same as for Unix cron.

  4. Moodle in English: Cannot obtain task lock

    Cannot obtain task lock. I'm running 3.5.2. Cron is running every minute and other tasks are fine except LDAP sync users this one. If i click 'run now' in scheduled tasks, it works fine. But when i manually run the php script it gives me error: cannot obtain task lock. I guess this is the reason why it doesn't run it as scheduled but cannot ...

  5. Moodle in English: Custom scheduled task cron locks

    Hi all, I am trying to create a custom scheduled task to automate creating categories from an 'external' database. I have created the table I need (its actually an additional table within the moodle database for now, but the code that reads it might get changed to point to a completely external one - but for now that's not the issue, that bit works on my dev environment).