Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Moodle
  3. No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails

No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails

Scheduled Pinned Locked Moved Moodle
22 Posts 5 Posters 4.9k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • girishG girish

      @d-sein @jagan can you add a line in /app/data/moodle/config.php:

      $CFG->dirroot = '/app/data/moodle';
      

      That seems to fix the problem.

      root@e13267b5-4d35-4443-9990-39dcae50884e:/app/data/moodle# php ./admin/tool/task/cli/schedule_task.php --execute="\core\task\messaging_clea
      nup_task"
      Execute scheduled task: Background processing for messaging (core\task\messaging_cleanup_task)
      ... used 8 dbqueries
      ... used 0.016392946243286 seconds
      
      D Offline
      D Offline
      d-sein
      wrote on last edited by
      #8

      @girish Thanks for investigating...

      PHP Error fixed, but Problem with sending mails from forums or the daily digest mails not solved.

      Automatic updates are enabled and saw that the "missing" line in /app/data/moodle/config.php was already set.

      Cloudron Version: v7.2.5 (Ubuntu 20.04.2 LTS)
      Moodle App Version: 4.0.3

      I can confirm that the PHP Error is fixed and the cron task core\task\messaging_cleanup_task works,
      BUT still no mails from forums (new threads, posts or daily digest) going out to users.

      root@xxxxxxxx:/app/data/moodle# php ./admin/tool/task/cli/schedule_task.php --execute="\core\task\messaging_cleanup_task"
      Execute scheduled task: Hintergrundprozess für Mitteilungen (core\task\messaging_cleanup_task)
      ... used 8 dbqueries
      ... used 0.029027938842773 seconds
      

      📩 Double checked configs of mail within moodle and cloudron (E-Mail Log) today. Other mails like "forget password", mails from direct messaging and testmails are send to users.

      Could anyone here please confirm that mails like daily digest mails or forum mails are working with moodle app within cloudron?

      With debugging enabled i have now following errors/warning by executing the adhoc_task.php in the CLI:

      php adhoc_task.php --execute -f
      Server Time: Tue, 23 Aug 2022 12:10:27 +0200
      
      Execute adhoc task: mod_forum\task\send_user_notifications
      ... started 12:10:28. Current memory use 12.8 MB.
      Sending messages to xxxxx-moodle (2)
      PHP Notice:  Undefined property: stdClass::$mnet_localhost_id in /app/data/moodle/lib/accesslib.php on line 1814
      
      Notice: Undefined property: stdClass::$mnet_localhost_id in /app/data/moodle/lib/accesslib.php on line 1814
      PHP Notice:  Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
      
      Notice: Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
      PHP Notice:  Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
      
      Notice: Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
      PHP Notice:  Undefined property: stdClass::$mnet_localhost_id in /app/data/moodle/lib/accesslib.php on line 1814
      
      Notice: Undefined property: stdClass::$mnet_localhost_id in /app/data/moodle/lib/accesslib.php on line 1814
      PHP Notice:  Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
      
      Notice: Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
      PHP Notice:  Undefined property: stdClass::$mnet_localhost_id in /app/data/moodle/lib/accesslib.php on line 1814
      
      Notice: Undefined property: stdClass::$mnet_localhost_id in /app/data/moodle/lib/accesslib.php on line 1814
      PHP Notice:  Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
      
      Notice: Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
      PHP Notice:  Undefined property: stdClass::$libdir in /app/data/moodle/lib/weblib.php on line 1111
      
      Notice: Undefined property: stdClass::$libdir in /app/data/moodle/lib/weblib.php on line 1111
      PHP Warning:  require_once(/phpmailer/moodle_phpmailer.php): failed to open stream: No such file or directory in /app/data/moodle/lib/weblib.php on line 1111
      
      Warning: require_once(/phpmailer/moodle_phpmailer.php): failed to open stream: No such file or directory in /app/data/moodle/lib/weblib.php on line 1111
      PHP Fatal error:  require_once(): Failed opening required '/phpmailer/moodle_phpmailer.php' (include_path='/app/data/moodle/lib/pear:.:/usr/share/php') in /app/data/moodle/lib/weblib.php on line 1111
      
      Fatal error: require_once(): Failed opening required '/phpmailer/moodle_phpmailer.php' (include_path='/app/data/moodle/lib/pear:.:/usr/share/php') in /app/data/moodle/lib/weblib.php on line 1111
      PHP Notice:  Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
      
      Notice: Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
      PHP Notice:  Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
      
      Notice: Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
      

      Here are some links from moodle forums with nearly the same problem:
      https://moodle.org/mod/forum/discuss.php?d=436778
      https://moodle.org/mod/forum/discuss.php?d=395394
      https://moodle.org/mod/forum/discuss.php?d=388490
      https://moodle.org/mod/forum/discuss.php?d=397915

      girishG 1 Reply Last reply
      1
      • D d-sein

        @girish Thanks for investigating...

        PHP Error fixed, but Problem with sending mails from forums or the daily digest mails not solved.

        Automatic updates are enabled and saw that the "missing" line in /app/data/moodle/config.php was already set.

        Cloudron Version: v7.2.5 (Ubuntu 20.04.2 LTS)
        Moodle App Version: 4.0.3

        I can confirm that the PHP Error is fixed and the cron task core\task\messaging_cleanup_task works,
        BUT still no mails from forums (new threads, posts or daily digest) going out to users.

        root@xxxxxxxx:/app/data/moodle# php ./admin/tool/task/cli/schedule_task.php --execute="\core\task\messaging_cleanup_task"
        Execute scheduled task: Hintergrundprozess für Mitteilungen (core\task\messaging_cleanup_task)
        ... used 8 dbqueries
        ... used 0.029027938842773 seconds
        

        📩 Double checked configs of mail within moodle and cloudron (E-Mail Log) today. Other mails like "forget password", mails from direct messaging and testmails are send to users.

        Could anyone here please confirm that mails like daily digest mails or forum mails are working with moodle app within cloudron?

        With debugging enabled i have now following errors/warning by executing the adhoc_task.php in the CLI:

        php adhoc_task.php --execute -f
        Server Time: Tue, 23 Aug 2022 12:10:27 +0200
        
        Execute adhoc task: mod_forum\task\send_user_notifications
        ... started 12:10:28. Current memory use 12.8 MB.
        Sending messages to xxxxx-moodle (2)
        PHP Notice:  Undefined property: stdClass::$mnet_localhost_id in /app/data/moodle/lib/accesslib.php on line 1814
        
        Notice: Undefined property: stdClass::$mnet_localhost_id in /app/data/moodle/lib/accesslib.php on line 1814
        PHP Notice:  Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
        
        Notice: Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
        PHP Notice:  Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
        
        Notice: Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
        PHP Notice:  Undefined property: stdClass::$mnet_localhost_id in /app/data/moodle/lib/accesslib.php on line 1814
        
        Notice: Undefined property: stdClass::$mnet_localhost_id in /app/data/moodle/lib/accesslib.php on line 1814
        PHP Notice:  Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
        
        Notice: Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
        PHP Notice:  Undefined property: stdClass::$mnet_localhost_id in /app/data/moodle/lib/accesslib.php on line 1814
        
        Notice: Undefined property: stdClass::$mnet_localhost_id in /app/data/moodle/lib/accesslib.php on line 1814
        PHP Notice:  Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
        
        Notice: Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
        PHP Notice:  Undefined property: stdClass::$libdir in /app/data/moodle/lib/weblib.php on line 1111
        
        Notice: Undefined property: stdClass::$libdir in /app/data/moodle/lib/weblib.php on line 1111
        PHP Warning:  require_once(/phpmailer/moodle_phpmailer.php): failed to open stream: No such file or directory in /app/data/moodle/lib/weblib.php on line 1111
        
        Warning: require_once(/phpmailer/moodle_phpmailer.php): failed to open stream: No such file or directory in /app/data/moodle/lib/weblib.php on line 1111
        PHP Fatal error:  require_once(): Failed opening required '/phpmailer/moodle_phpmailer.php' (include_path='/app/data/moodle/lib/pear:.:/usr/share/php') in /app/data/moodle/lib/weblib.php on line 1111
        
        Fatal error: require_once(): Failed opening required '/phpmailer/moodle_phpmailer.php' (include_path='/app/data/moodle/lib/pear:.:/usr/share/php') in /app/data/moodle/lib/weblib.php on line 1111
        PHP Notice:  Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
        
        Notice: Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
        PHP Notice:  Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
        
        Notice: Undefined property: stdClass::$debugdeveloper in /app/data/moodle/lib/dml/moodle_database.php on line 1100
        

        Here are some links from moodle forums with nearly the same problem:
        https://moodle.org/mod/forum/discuss.php?d=436778
        https://moodle.org/mod/forum/discuss.php?d=395394
        https://moodle.org/mod/forum/discuss.php?d=388490
        https://moodle.org/mod/forum/discuss.php?d=397915

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #9

        @d-sein I guess the fix in https://moodle.org/mod/forum/discuss.php?d=388490 does not help?

        D 1 Reply Last reply
        0
        • girishG girish

          @d-sein I guess the fix in https://moodle.org/mod/forum/discuss.php?d=388490 does not help?

          D Offline
          D Offline
          d-sein
          wrote on last edited by
          #10

          @girish Thanks for your reply. Yesterday i installed a complete new moodle app version.

          ❎ Today i tested a lot, but also the settings from the post https://moodle.org/mod/forum/discuss.php?d=388490 didn't solve the problem and several other attempts.

          ✔ But it works now after disabling / unchecking the settings "Cron execution via command line only" moodle -> site administration -> security and allow running the cron from a web browser the forum mails are send out. No errors and no entries in the db -> table mdl_task_adhoc

          Please explain me the difference of the build in cli cronjob within cloudron / moodle and the webbased moodle cron?

          Or cloud you please advise me what settings i should use for the cli cron.

          Otherwise i think of creating and using a new cronjob with ***** /usr/bin/wget https://{your-domain}/admin/cron.php?password=ganzgeheim

          Thanks a lot.

          Webbased Cron:
          https://{your-domain}/admin/cron.php?password=ganzgeheim

          Webbrowser Cron / Result: Cron script completed correctly

          Server Time: Wed, 24 Aug 2022 15:00:05 +0200
          
          
          Execute scheduled task: Unbestätigte Nutzerprofile löschen (core\task\delete_unconfirmed_users_task)
          ... started 15:00:05. Current memory use 2.7 MB.
          ... used 3 dbqueries
          ... used 0.0016529560089111 seconds
          Scheduled task complete: Unbestätigte Nutzerprofile löschen (core\task\delete_unconfirmed_users_task)
          Execute scheduled task: Indizierung für die globale Suche (core\task\search_index_task)
          ... started 15:00:05. Current memory use 3.2 MB.
          ... used 0 dbqueries
          ... used 0.00017499923706055 seconds
          Scheduled task complete: Indizierung für die globale Suche (core\task\search_index_task)
          Execute scheduled task: Papierkorb für den Kurs aufräumen (tool_recyclebin\task\cleanup_course_bin)
          ... started 15:00:05. Current memory use 2.8 MB.
          ... used 3 dbqueries
          ... used 0.0016279220581055 seconds
          Scheduled task complete: Papierkorb für den Kurs aufräumen (tool_recyclebin\task\cleanup_course_bin)
          Execute scheduled task: Papierkorb für den Kursbereich aufräumen (tool_recyclebin\task\cleanup_category_bin)
          ... started 15:00:05. Current memory use 2.8 MB.
          ... used 3 dbqueries
          ... used 0.0025839805603027 seconds
          Scheduled task complete: Papierkorb für den Kursbereich aufräumen (tool_recyclebin\task\cleanup_category_bin)
          Execute scheduled task: E-Mail-Versand aus Foren (mod_forum\task\cron_task)
          ... started 15:00:05. Current memory use 2.9 MB.
          Removing old digest records from 7 days ago.
          Removed all old digest records.
          Fetching unmailed posts.
            No posts found.
          ... used 2 dbqueries
          ... used 0.0037319660186768 seconds
          Scheduled task complete: E-Mail-Versand aus Foren (mod_forum\task\cron_task)
          Execute scheduled task: Abgaben für Anmerkungen vorbereiten (assignfeedback_editpdf\task\convert_submissions)
          ... started 15:00:05. Current memory use 3.0 MB.
          ... used 1 dbqueries
          ... used 0.0014200210571289 seconds
          Scheduled task complete: Abgaben für Anmerkungen vorbereiten (assignfeedback_editpdf\task\convert_submissions)
          Execute scheduled task: Manuelle Einschreibung synchronisieren (enrol_manual\task\sync_enrolments)
          ... started 15:00:05. Current memory use 3.3 MB.
          Verifying manual enrolment expiration...
          ...manual enrolment updates finished.
          ... used 0 dbqueries
          ... used 0.00061392784118652 seconds
          Scheduled task complete: Manuelle Einschreibung synchronisieren (enrol_manual\task\sync_enrolments)
          Execute scheduled task: Systemnachricht zum Ablauf von manuellen Einschreibungen (enrol_manual\task\send_expiry_notifications)
          ... started 15:00:05. Current memory use 3.3 MB.
          manual enrolment expiry notifications were already sent today at Mittwoch, 24. August 2022, 06:00.
          ... used 0 dbqueries
          ... used 0.00040388107299805 seconds
          Scheduled task complete: Systemnachricht zum Ablauf von manuellen Einschreibungen (enrol_manual\task\send_expiry_notifications)
          Execute scheduled task: Selbsteinschreibung synchronisieren (enrol_self\task\sync_enrolments)
          ... started 15:00:05. Current memory use 3.3 MB.
          Verifying self-enrolments...
          ...user self-enrolment updates finished.
          No expired enrol_self enrolments detected
          ... used 6 dbqueries
          ... used 0.0055639743804932 seconds
          Scheduled task complete: Selbsteinschreibung synchronisieren (enrol_self\task\sync_enrolments)
          Execute scheduled task: Systemnachricht zum Ablauf von Selbsteinschreibungen (enrol_self\task\send_expiry_notifications)
          ... started 15:00:05. Current memory use 3.3 MB.
          self enrolment expiry notifications were already sent today at Mittwoch, 24. August 2022, 06:00.
          ... used 0 dbqueries
          ... used 0.00037312507629395 seconds
          Scheduled task complete: Systemnachricht zum Ablauf von Selbsteinschreibungen (enrol_self\task\send_expiry_notifications)
          Execute scheduled task: Badges verleihen (core\task\badges_cron_task)
          ... started 15:00:05. Current memory use 3.6 MB.
          Started reviewing available badges.
          Badges were issued 0 time(s).
          ... used 1 dbqueries
          ... used 0.0018401145935059 seconds
          Scheduled task complete: Badges verleihen (core\task\badges_cron_task)
          Execute scheduled task: Hintergrundprozess für Badge-Mitteilungen (core\task\badges_message_task)
          ... started 15:00:05. Current memory use 3.6 MB.
          Sending scheduled badge notifications.
          ... used 1 dbqueries
          ... used 0.0011579990386963 seconds
          Scheduled task complete: Hintergrundprozess für Badge-Mitteilungen (core\task\badges_message_task)
          Execute scheduled task: Hintergrundprozess für das Chatmodul (mod_chat\task\cron_task)
          ... started 15:00:05. Current memory use 3.6 MB.
          ... used 4 dbqueries
          ... used 0.0040950775146484 seconds
          Scheduled task complete: Hintergrundprozess für das Chatmodul (mod_chat\task\cron_task)
          Execute scheduled task: Hintergrundprozess für Lernpakete (mod_scorm\task\cron_task)
          ... started 15:00:05. Current memory use 3.7 MB.
          ... used 0 dbqueries
          ... used 0.00040388107299805 seconds
          Scheduled task complete: Hintergrundprozess für Lernpakete (mod_scorm\task\cron_task)
          Execute scheduled task: Barrierefreiheitsprüfung mit Bulk-Caching verarbeiten (tool_brickfield\task\bulk_process_courses)
          ... started 15:00:05. Current memory use 3.8 MB.
          ... used 3 dbqueries
          ... used 0.0026500225067139 seconds
          Scheduled task complete: Barrierefreiheitsprüfung mit Bulk-Caching verarbeiten (tool_brickfield\task\bulk_process_courses)
          Execute scheduled task: Bulk-Caching verarbeiten (tool_brickfield\task\bulk_process_caches)
          ... started 15:00:05. Current memory use 3.8 MB.
          ... used 3 dbqueries
          ... used 0.0022859573364258 seconds
          Scheduled task complete: Bulk-Caching verarbeiten (tool_brickfield\task\bulk_process_caches)
          Execute scheduled task: Inhaltsanalyseanforderungen verarbeiten (tool_brickfield\task\process_analysis_requests)
          ... started 15:00:05. Current memory use 3.8 MB.
          ... used 3 dbqueries
          ... used 0.0025320053100586 seconds
          Scheduled task complete: Inhaltsanalyseanforderungen verarbeiten (tool_brickfield\task\process_analysis_requests)
          Execute scheduled task: Alte Sessions bereinigen (core\task\session_cleanup_task)
          ... started 15:00:05. Current memory use 3.8 MB.
          ... used 24 dbqueries
          ... used 0.014279127120972 seconds
          Scheduled task complete: Alte Sessions bereinigen (core\task\session_cleanup_task)
          Execute scheduled task: Neues Nutzerkennwort senden (core\task\send_new_user_passwords_task)
          ... started 15:00:05. Current memory use 4.2 MB.
          ... used 1 dbqueries
          ... used 0.0011022090911865 seconds
          Scheduled task complete: Neues Nutzerkennwort senden (core\task\send_new_user_passwords_task)
          Execute scheduled task: Systemnachricht zu fehlgeschlagenen Anmeldeversuchen senden (core\task\send_failed_login_notifications_task)
          ... started 15:00:05. Current memory use 4.2 MB.
          ... used 2 dbqueries
          ... used 0.0026299953460693 seconds
          Scheduled task complete: Systemnachricht zu fehlgeschlagenen Anmeldeversuchen senden (core\task\send_failed_login_notifications_task)
          Execute scheduled task: Legacy Cron für Plugins (core\task\legacy_plugin_cron_task)
          ... started 15:00:05. Current memory use 4.2 MB.
          Running auth crons if required...
          Running enrol crons if required...
          Starting activity modules
          Finished activity modules
          Starting blocks
          Finished blocks
          Starting admin reports
          Finished admin reports
          Starting course reports
          Finished course reports
          Starting gradebook plugins
          Finished gradebook plugins
          ... used 2 dbqueries
          ... used 0.004518985748291 seconds
          Scheduled task complete: Legacy Cron für Plugins (core\task\legacy_plugin_cron_task)
          Execute scheduled task: Hintergrundprozess für Bewertungen (core\task\grade_cron_task)
          ... started 15:00:05. Current memory use 4.3 MB.
          ... used 6 dbqueries
          ... used 0.0050089359283447 seconds
          Scheduled task complete: Hintergrundprozess für Bewertungen (core\task\grade_cron_task)
          Execute scheduled task: Normale Abschlussdaten berechnen (core\task\completion_regular_task)
          ... started 15:00:05. Current memory use 4.3 MB.
          Aggregating completions
          ... used 18 dbqueries
          ... used 0.033792972564697 seconds
          Scheduled task complete: Normale Abschlussdaten berechnen (core\task\completion_regular_task)
          Execute scheduled task: Hintergrundprozess für Portfolio-Plugins (core\task\portfolio_cron_task)
          ... started 15:00:05. Current memory use 4.3 MB.
          ... used 0 dbqueries
          ... used 0.00014495849609375 seconds
          Scheduled task complete: Hintergrundprozess für Portfolio-Plugins (core\task\portfolio_cron_task)
          Execute scheduled task: Hintergrundprozess für den Legacy Cron in Plagiat-Plugins (core\task\plagiarism_cron_task)
          ... started 15:00:05. Current memory use 4.3 MB.
          ... used 0 dbqueries
          ... used 0.00014781951904297 seconds
          Scheduled task complete: Hintergrundprozess für den Legacy Cron in Plagiat-Plugins (core\task\plagiarism_cron_task)
          Execute scheduled task: Systemnachrichten zu Kalendereinträgen senden (core\task\calendar_cron_task)
          ... started 15:00:05. Current memory use 4.3 MB.
          ... used 1 dbqueries
          ... used 0.001370906829834 seconds
          Scheduled task complete: Systemnachrichten zu Kalendereinträgen senden (core\task\calendar_cron_task)
          Execute scheduled task: Externe Blogs synchronisieren (core\task\blog_cron_task)
          ... started 15:00:05. Current memory use 4.5 MB.
          ... used 2 dbqueries
          ... used 0.0016438961029053 seconds
          Scheduled task complete: Externe Blogs synchronisieren (core\task\blog_cron_task)
          Execute scheduled task: Hintergrundprozess um Fragen-Vorschauen zu löschen (core\task\question_preview_cleanup_task)
          ... started 15:00:05. Current memory use 4.5 MB.
          
            Cleaning up old question previews...done.
          ... used 5 dbqueries
          ... used 0.0082058906555176 seconds
          Scheduled task complete: Hintergrundprozess um Fragen-Vorschauen zu löschen (core\task\question_preview_cleanup_task)
          Execute scheduled task: Hintergrundprozess zum Löschen von Fragestatistik-Caches (core\task\question_stats_cleanup_task)
          ... started 15:00:05. Current memory use 4.7 MB.
          
            Cleaning up old question statistics cache records...done.
          ... used 4 dbqueries
          ... used 0.0024378299713135 seconds
          Scheduled task complete: Hintergrundprozess zum Löschen von Fragestatistik-Caches (core\task\question_stats_cleanup_task)
          Execute scheduled task: Berichtszeitpläne senden (core_reportbuilder\task\send_schedules)
          ... started 15:00:05. Current memory use 4.7 MB.
          ... used 1 dbqueries
          ... used 0.0012600421905518 seconds
          Scheduled task complete: Berichtszeitpläne senden (core_reportbuilder\task\send_schedules)
          Execute scheduled task: Hintergrundprozess für das Aufgabenmodul (mod_assign\task\cron_task)
          ... started 15:00:05. Current memory use 4.8 MB.
          ... used 3 dbqueries
          ... used 0.012731075286865 seconds
          Scheduled task complete: Hintergrundprozess für das Aufgabenmodul (mod_assign\task\cron_task)
          Execute scheduled task: Aktualisierung überfälliger Testversuche (mod_quiz\task\update_overdue_attempts)
          ... started 15:00:05. Current memory use 5.0 MB.
            Looking for quiz overdue quiz attempts...
            Considered 0 attempts in 0 quizzes.
          ... used 3 dbqueries
          ... used 0.0089221000671387 seconds
          Scheduled task complete: Aktualisierung überfälliger Testversuche (mod_quiz\task\update_overdue_attempts)
          Execute scheduled task: Testberichte Cron Job (veraltet) (mod_quiz\task\legacy_quiz_reports_cron)
          ... started 15:00:05. Current memory use 5.1 MB.
          ... used 0 dbqueries
          ... used 0.00022006034851074 seconds
          Scheduled task complete: Testberichte Cron Job (veraltet) (mod_quiz\task\legacy_quiz_reports_cron)
          Execute scheduled task: Testzugriffsregeln Cron Job (veraltet) (mod_quiz\task\legacy_quiz_accessrules_cron)
          ... started 15:00:06. Current memory use 5.1 MB.
          ... used 0 dbqueries
          ... used 0.00029420852661133 seconds
          Scheduled task complete: Testzugriffsregeln Cron Job (veraltet) (mod_quiz\task\legacy_quiz_accessrules_cron)
          Execute scheduled task: Hintergrundprozess für gegenseitige Beurteilung (mod_workshop\task\cron_task)
          ... started 15:00:06. Current memory use 5.1 MB.
           processing workshop subplugins ...
          ... used 1 dbqueries
          ... used 0.001568078994751 seconds
          Scheduled task complete: Hintergrundprozess für gegenseitige Beurteilung (mod_workshop\task\cron_task)
          Execute scheduled task: Alte Cron-Zuteilung für gegenseitige Beurteilungen (mod_workshop\task\legacy_workshop_allocation_cron)
          ... started 15:00:06. Current memory use 5.1 MB.
          ... used 0 dbqueries
          ... used 0.00019311904907227 seconds
          Scheduled task complete: Alte Cron-Zuteilung für gegenseitige Beurteilungen (mod_workshop\task\legacy_workshop_allocation_cron)
          Execute scheduled task: Eingehende E-Mail-Abholung (tool_messageinbound\task\pickup_task)
          ... started 15:00:06. Current memory use 5.2 MB.
          Inbound Message not fully configured - exiting early.
          ... used 0 dbqueries
          ... used 0.00025796890258789 seconds
          Scheduled task complete: Eingehende E-Mail-Abholung (tool_messageinbound\task\pickup_task)
          Execute scheduled task: Event-Monitor-Einträge löschen (tool_monitor\task\clean_events)
          ... started 15:00:06. Current memory use 5.1 MB.
          ... used 0 dbqueries
          ... used 0.00025200843811035 seconds
          Scheduled task complete: Event-Monitor-Einträge löschen (tool_monitor\task\clean_events)
          Execute scheduled task: Hintergrundprozess für die geplante Zuordnung (workshopallocation_scheduled\task\cron_task)
          ... started 15:00:06. Current memory use 5.2 MB.
          ... no workshops awaiting scheduled allocation. ... used 1 dbqueries
          ... used 0.0013461112976074 seconds
          Scheduled task complete: Hintergrundprozess für die geplante Zuordnung (workshopallocation_scheduled\task\cron_task)
          Ran 0 adhoc tasks found at Wed, 24 Aug 2022 15:00:05 +0200
          Cron script completed correctly
          Cron completed at 15:00:06. Memory used 5.2 MB.
          Execution took 0.847156 seconds
          
          C 1 Reply Last reply
          1
          • D d-sein

            @girish Thanks for your reply. Yesterday i installed a complete new moodle app version.

            ❎ Today i tested a lot, but also the settings from the post https://moodle.org/mod/forum/discuss.php?d=388490 didn't solve the problem and several other attempts.

            ✔ But it works now after disabling / unchecking the settings "Cron execution via command line only" moodle -> site administration -> security and allow running the cron from a web browser the forum mails are send out. No errors and no entries in the db -> table mdl_task_adhoc

            Please explain me the difference of the build in cli cronjob within cloudron / moodle and the webbased moodle cron?

            Or cloud you please advise me what settings i should use for the cli cron.

            Otherwise i think of creating and using a new cronjob with ***** /usr/bin/wget https://{your-domain}/admin/cron.php?password=ganzgeheim

            Thanks a lot.

            Webbased Cron:
            https://{your-domain}/admin/cron.php?password=ganzgeheim

            Webbrowser Cron / Result: Cron script completed correctly

            Server Time: Wed, 24 Aug 2022 15:00:05 +0200
            
            
            Execute scheduled task: Unbestätigte Nutzerprofile löschen (core\task\delete_unconfirmed_users_task)
            ... started 15:00:05. Current memory use 2.7 MB.
            ... used 3 dbqueries
            ... used 0.0016529560089111 seconds
            Scheduled task complete: Unbestätigte Nutzerprofile löschen (core\task\delete_unconfirmed_users_task)
            Execute scheduled task: Indizierung für die globale Suche (core\task\search_index_task)
            ... started 15:00:05. Current memory use 3.2 MB.
            ... used 0 dbqueries
            ... used 0.00017499923706055 seconds
            Scheduled task complete: Indizierung für die globale Suche (core\task\search_index_task)
            Execute scheduled task: Papierkorb für den Kurs aufräumen (tool_recyclebin\task\cleanup_course_bin)
            ... started 15:00:05. Current memory use 2.8 MB.
            ... used 3 dbqueries
            ... used 0.0016279220581055 seconds
            Scheduled task complete: Papierkorb für den Kurs aufräumen (tool_recyclebin\task\cleanup_course_bin)
            Execute scheduled task: Papierkorb für den Kursbereich aufräumen (tool_recyclebin\task\cleanup_category_bin)
            ... started 15:00:05. Current memory use 2.8 MB.
            ... used 3 dbqueries
            ... used 0.0025839805603027 seconds
            Scheduled task complete: Papierkorb für den Kursbereich aufräumen (tool_recyclebin\task\cleanup_category_bin)
            Execute scheduled task: E-Mail-Versand aus Foren (mod_forum\task\cron_task)
            ... started 15:00:05. Current memory use 2.9 MB.
            Removing old digest records from 7 days ago.
            Removed all old digest records.
            Fetching unmailed posts.
              No posts found.
            ... used 2 dbqueries
            ... used 0.0037319660186768 seconds
            Scheduled task complete: E-Mail-Versand aus Foren (mod_forum\task\cron_task)
            Execute scheduled task: Abgaben für Anmerkungen vorbereiten (assignfeedback_editpdf\task\convert_submissions)
            ... started 15:00:05. Current memory use 3.0 MB.
            ... used 1 dbqueries
            ... used 0.0014200210571289 seconds
            Scheduled task complete: Abgaben für Anmerkungen vorbereiten (assignfeedback_editpdf\task\convert_submissions)
            Execute scheduled task: Manuelle Einschreibung synchronisieren (enrol_manual\task\sync_enrolments)
            ... started 15:00:05. Current memory use 3.3 MB.
            Verifying manual enrolment expiration...
            ...manual enrolment updates finished.
            ... used 0 dbqueries
            ... used 0.00061392784118652 seconds
            Scheduled task complete: Manuelle Einschreibung synchronisieren (enrol_manual\task\sync_enrolments)
            Execute scheduled task: Systemnachricht zum Ablauf von manuellen Einschreibungen (enrol_manual\task\send_expiry_notifications)
            ... started 15:00:05. Current memory use 3.3 MB.
            manual enrolment expiry notifications were already sent today at Mittwoch, 24. August 2022, 06:00.
            ... used 0 dbqueries
            ... used 0.00040388107299805 seconds
            Scheduled task complete: Systemnachricht zum Ablauf von manuellen Einschreibungen (enrol_manual\task\send_expiry_notifications)
            Execute scheduled task: Selbsteinschreibung synchronisieren (enrol_self\task\sync_enrolments)
            ... started 15:00:05. Current memory use 3.3 MB.
            Verifying self-enrolments...
            ...user self-enrolment updates finished.
            No expired enrol_self enrolments detected
            ... used 6 dbqueries
            ... used 0.0055639743804932 seconds
            Scheduled task complete: Selbsteinschreibung synchronisieren (enrol_self\task\sync_enrolments)
            Execute scheduled task: Systemnachricht zum Ablauf von Selbsteinschreibungen (enrol_self\task\send_expiry_notifications)
            ... started 15:00:05. Current memory use 3.3 MB.
            self enrolment expiry notifications were already sent today at Mittwoch, 24. August 2022, 06:00.
            ... used 0 dbqueries
            ... used 0.00037312507629395 seconds
            Scheduled task complete: Systemnachricht zum Ablauf von Selbsteinschreibungen (enrol_self\task\send_expiry_notifications)
            Execute scheduled task: Badges verleihen (core\task\badges_cron_task)
            ... started 15:00:05. Current memory use 3.6 MB.
            Started reviewing available badges.
            Badges were issued 0 time(s).
            ... used 1 dbqueries
            ... used 0.0018401145935059 seconds
            Scheduled task complete: Badges verleihen (core\task\badges_cron_task)
            Execute scheduled task: Hintergrundprozess für Badge-Mitteilungen (core\task\badges_message_task)
            ... started 15:00:05. Current memory use 3.6 MB.
            Sending scheduled badge notifications.
            ... used 1 dbqueries
            ... used 0.0011579990386963 seconds
            Scheduled task complete: Hintergrundprozess für Badge-Mitteilungen (core\task\badges_message_task)
            Execute scheduled task: Hintergrundprozess für das Chatmodul (mod_chat\task\cron_task)
            ... started 15:00:05. Current memory use 3.6 MB.
            ... used 4 dbqueries
            ... used 0.0040950775146484 seconds
            Scheduled task complete: Hintergrundprozess für das Chatmodul (mod_chat\task\cron_task)
            Execute scheduled task: Hintergrundprozess für Lernpakete (mod_scorm\task\cron_task)
            ... started 15:00:05. Current memory use 3.7 MB.
            ... used 0 dbqueries
            ... used 0.00040388107299805 seconds
            Scheduled task complete: Hintergrundprozess für Lernpakete (mod_scorm\task\cron_task)
            Execute scheduled task: Barrierefreiheitsprüfung mit Bulk-Caching verarbeiten (tool_brickfield\task\bulk_process_courses)
            ... started 15:00:05. Current memory use 3.8 MB.
            ... used 3 dbqueries
            ... used 0.0026500225067139 seconds
            Scheduled task complete: Barrierefreiheitsprüfung mit Bulk-Caching verarbeiten (tool_brickfield\task\bulk_process_courses)
            Execute scheduled task: Bulk-Caching verarbeiten (tool_brickfield\task\bulk_process_caches)
            ... started 15:00:05. Current memory use 3.8 MB.
            ... used 3 dbqueries
            ... used 0.0022859573364258 seconds
            Scheduled task complete: Bulk-Caching verarbeiten (tool_brickfield\task\bulk_process_caches)
            Execute scheduled task: Inhaltsanalyseanforderungen verarbeiten (tool_brickfield\task\process_analysis_requests)
            ... started 15:00:05. Current memory use 3.8 MB.
            ... used 3 dbqueries
            ... used 0.0025320053100586 seconds
            Scheduled task complete: Inhaltsanalyseanforderungen verarbeiten (tool_brickfield\task\process_analysis_requests)
            Execute scheduled task: Alte Sessions bereinigen (core\task\session_cleanup_task)
            ... started 15:00:05. Current memory use 3.8 MB.
            ... used 24 dbqueries
            ... used 0.014279127120972 seconds
            Scheduled task complete: Alte Sessions bereinigen (core\task\session_cleanup_task)
            Execute scheduled task: Neues Nutzerkennwort senden (core\task\send_new_user_passwords_task)
            ... started 15:00:05. Current memory use 4.2 MB.
            ... used 1 dbqueries
            ... used 0.0011022090911865 seconds
            Scheduled task complete: Neues Nutzerkennwort senden (core\task\send_new_user_passwords_task)
            Execute scheduled task: Systemnachricht zu fehlgeschlagenen Anmeldeversuchen senden (core\task\send_failed_login_notifications_task)
            ... started 15:00:05. Current memory use 4.2 MB.
            ... used 2 dbqueries
            ... used 0.0026299953460693 seconds
            Scheduled task complete: Systemnachricht zu fehlgeschlagenen Anmeldeversuchen senden (core\task\send_failed_login_notifications_task)
            Execute scheduled task: Legacy Cron für Plugins (core\task\legacy_plugin_cron_task)
            ... started 15:00:05. Current memory use 4.2 MB.
            Running auth crons if required...
            Running enrol crons if required...
            Starting activity modules
            Finished activity modules
            Starting blocks
            Finished blocks
            Starting admin reports
            Finished admin reports
            Starting course reports
            Finished course reports
            Starting gradebook plugins
            Finished gradebook plugins
            ... used 2 dbqueries
            ... used 0.004518985748291 seconds
            Scheduled task complete: Legacy Cron für Plugins (core\task\legacy_plugin_cron_task)
            Execute scheduled task: Hintergrundprozess für Bewertungen (core\task\grade_cron_task)
            ... started 15:00:05. Current memory use 4.3 MB.
            ... used 6 dbqueries
            ... used 0.0050089359283447 seconds
            Scheduled task complete: Hintergrundprozess für Bewertungen (core\task\grade_cron_task)
            Execute scheduled task: Normale Abschlussdaten berechnen (core\task\completion_regular_task)
            ... started 15:00:05. Current memory use 4.3 MB.
            Aggregating completions
            ... used 18 dbqueries
            ... used 0.033792972564697 seconds
            Scheduled task complete: Normale Abschlussdaten berechnen (core\task\completion_regular_task)
            Execute scheduled task: Hintergrundprozess für Portfolio-Plugins (core\task\portfolio_cron_task)
            ... started 15:00:05. Current memory use 4.3 MB.
            ... used 0 dbqueries
            ... used 0.00014495849609375 seconds
            Scheduled task complete: Hintergrundprozess für Portfolio-Plugins (core\task\portfolio_cron_task)
            Execute scheduled task: Hintergrundprozess für den Legacy Cron in Plagiat-Plugins (core\task\plagiarism_cron_task)
            ... started 15:00:05. Current memory use 4.3 MB.
            ... used 0 dbqueries
            ... used 0.00014781951904297 seconds
            Scheduled task complete: Hintergrundprozess für den Legacy Cron in Plagiat-Plugins (core\task\plagiarism_cron_task)
            Execute scheduled task: Systemnachrichten zu Kalendereinträgen senden (core\task\calendar_cron_task)
            ... started 15:00:05. Current memory use 4.3 MB.
            ... used 1 dbqueries
            ... used 0.001370906829834 seconds
            Scheduled task complete: Systemnachrichten zu Kalendereinträgen senden (core\task\calendar_cron_task)
            Execute scheduled task: Externe Blogs synchronisieren (core\task\blog_cron_task)
            ... started 15:00:05. Current memory use 4.5 MB.
            ... used 2 dbqueries
            ... used 0.0016438961029053 seconds
            Scheduled task complete: Externe Blogs synchronisieren (core\task\blog_cron_task)
            Execute scheduled task: Hintergrundprozess um Fragen-Vorschauen zu löschen (core\task\question_preview_cleanup_task)
            ... started 15:00:05. Current memory use 4.5 MB.
            
              Cleaning up old question previews...done.
            ... used 5 dbqueries
            ... used 0.0082058906555176 seconds
            Scheduled task complete: Hintergrundprozess um Fragen-Vorschauen zu löschen (core\task\question_preview_cleanup_task)
            Execute scheduled task: Hintergrundprozess zum Löschen von Fragestatistik-Caches (core\task\question_stats_cleanup_task)
            ... started 15:00:05. Current memory use 4.7 MB.
            
              Cleaning up old question statistics cache records...done.
            ... used 4 dbqueries
            ... used 0.0024378299713135 seconds
            Scheduled task complete: Hintergrundprozess zum Löschen von Fragestatistik-Caches (core\task\question_stats_cleanup_task)
            Execute scheduled task: Berichtszeitpläne senden (core_reportbuilder\task\send_schedules)
            ... started 15:00:05. Current memory use 4.7 MB.
            ... used 1 dbqueries
            ... used 0.0012600421905518 seconds
            Scheduled task complete: Berichtszeitpläne senden (core_reportbuilder\task\send_schedules)
            Execute scheduled task: Hintergrundprozess für das Aufgabenmodul (mod_assign\task\cron_task)
            ... started 15:00:05. Current memory use 4.8 MB.
            ... used 3 dbqueries
            ... used 0.012731075286865 seconds
            Scheduled task complete: Hintergrundprozess für das Aufgabenmodul (mod_assign\task\cron_task)
            Execute scheduled task: Aktualisierung überfälliger Testversuche (mod_quiz\task\update_overdue_attempts)
            ... started 15:00:05. Current memory use 5.0 MB.
              Looking for quiz overdue quiz attempts...
              Considered 0 attempts in 0 quizzes.
            ... used 3 dbqueries
            ... used 0.0089221000671387 seconds
            Scheduled task complete: Aktualisierung überfälliger Testversuche (mod_quiz\task\update_overdue_attempts)
            Execute scheduled task: Testberichte Cron Job (veraltet) (mod_quiz\task\legacy_quiz_reports_cron)
            ... started 15:00:05. Current memory use 5.1 MB.
            ... used 0 dbqueries
            ... used 0.00022006034851074 seconds
            Scheduled task complete: Testberichte Cron Job (veraltet) (mod_quiz\task\legacy_quiz_reports_cron)
            Execute scheduled task: Testzugriffsregeln Cron Job (veraltet) (mod_quiz\task\legacy_quiz_accessrules_cron)
            ... started 15:00:06. Current memory use 5.1 MB.
            ... used 0 dbqueries
            ... used 0.00029420852661133 seconds
            Scheduled task complete: Testzugriffsregeln Cron Job (veraltet) (mod_quiz\task\legacy_quiz_accessrules_cron)
            Execute scheduled task: Hintergrundprozess für gegenseitige Beurteilung (mod_workshop\task\cron_task)
            ... started 15:00:06. Current memory use 5.1 MB.
             processing workshop subplugins ...
            ... used 1 dbqueries
            ... used 0.001568078994751 seconds
            Scheduled task complete: Hintergrundprozess für gegenseitige Beurteilung (mod_workshop\task\cron_task)
            Execute scheduled task: Alte Cron-Zuteilung für gegenseitige Beurteilungen (mod_workshop\task\legacy_workshop_allocation_cron)
            ... started 15:00:06. Current memory use 5.1 MB.
            ... used 0 dbqueries
            ... used 0.00019311904907227 seconds
            Scheduled task complete: Alte Cron-Zuteilung für gegenseitige Beurteilungen (mod_workshop\task\legacy_workshop_allocation_cron)
            Execute scheduled task: Eingehende E-Mail-Abholung (tool_messageinbound\task\pickup_task)
            ... started 15:00:06. Current memory use 5.2 MB.
            Inbound Message not fully configured - exiting early.
            ... used 0 dbqueries
            ... used 0.00025796890258789 seconds
            Scheduled task complete: Eingehende E-Mail-Abholung (tool_messageinbound\task\pickup_task)
            Execute scheduled task: Event-Monitor-Einträge löschen (tool_monitor\task\clean_events)
            ... started 15:00:06. Current memory use 5.1 MB.
            ... used 0 dbqueries
            ... used 0.00025200843811035 seconds
            Scheduled task complete: Event-Monitor-Einträge löschen (tool_monitor\task\clean_events)
            Execute scheduled task: Hintergrundprozess für die geplante Zuordnung (workshopallocation_scheduled\task\cron_task)
            ... started 15:00:06. Current memory use 5.2 MB.
            ... no workshops awaiting scheduled allocation. ... used 1 dbqueries
            ... used 0.0013461112976074 seconds
            Scheduled task complete: Hintergrundprozess für die geplante Zuordnung (workshopallocation_scheduled\task\cron_task)
            Ran 0 adhoc tasks found at Wed, 24 Aug 2022 15:00:05 +0200
            Cron script completed correctly
            Cron completed at 15:00:06. Memory used 5.2 MB.
            Execution took 0.847156 seconds
            
            C Offline
            C Offline
            ccfu
            wrote on last edited by
            #11

            I am having a similar problem with Moodle (4.1.2) and forum emails not being sending, but unfortunately the solution to allow cron via browser hasn't worked for me and I am still getting the error Failed opening required '/phpmailer/moodle_phpmailer.php'.

            Any other suggestions?

            C girishG 2 Replies Last reply
            1
            • C ccfu

              I am having a similar problem with Moodle (4.1.2) and forum emails not being sending, but unfortunately the solution to allow cron via browser hasn't worked for me and I am still getting the error Failed opening required '/phpmailer/moodle_phpmailer.php'.

              Any other suggestions?

              C Offline
              C Offline
              ccfu
              wrote on last edited by
              #12

              On further investigation this seems to be an issue with the php includes path in the Cloudron install. The adhoc tasks work fine when Moodle is installed in a LAMP App.

              @girish or @nebulon Maybe you could take another look at this?

              girishG 1 Reply Last reply
              1
              • C ccfu

                On further investigation this seems to be an issue with the php includes path in the Cloudron install. The adhoc tasks work fine when Moodle is installed in a LAMP App.

                @girish or @nebulon Maybe you could take another look at this?

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by girish
                #13

                @ccfu For some reason, the change at https://forum.cloudron.io/post/52408 never made it into the package. Looks like I just forgot. Actually, it's there. mmm.

                @ccfu can you check if you installation has that value set?

                C 1 Reply Last reply
                0
                • C ccfu

                  I am having a similar problem with Moodle (4.1.2) and forum emails not being sending, but unfortunately the solution to allow cron via browser hasn't worked for me and I am still getting the error Failed opening required '/phpmailer/moodle_phpmailer.php'.

                  Any other suggestions?

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #14

                  @ccfu said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

                  but unfortunately the solution to allow cron via browser hasn't worked for me

                  This shouldn't be required. The package already runs cron. can you run /usr/local/bin/gosu www-data:www-data /usr/bin/php /app/code/new/admin/cli/cron.php ?

                  1 Reply Last reply
                  0
                  • girishG girish

                    @ccfu For some reason, the change at https://forum.cloudron.io/post/52408 never made it into the package. Looks like I just forgot. Actually, it's there. mmm.

                    @ccfu can you check if you installation has that value set?

                    C Offline
                    C Offline
                    ccfu
                    wrote on last edited by
                    #15

                    @girish said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

                    @ccfu can you check if you installation has that value set?

                    Yes, it does.

                    @girish said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

                    @ccfu said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

                    but unfortunately the solution to allow cron via browser hasn't worked for me

                    This shouldn't be required. The package already runs cron. can you run /usr/local/bin/gosu www-data:www-data /usr/bin/php /app/code/new/admin/cli/cron.php ?

                    Yes, that runs and completes successfully. There are also several other tasks completing regularly without issue.

                    The error I am getting at /admin/tasklogs.php is:

                    Execute adhoc task: mod_forum\task\send_user_notifications
                    Adhoc task id: 32
                    Adhoc task custom data: ["1"]
                    ... started 21:14:29. Current memory use 31.7 MB.
                    Debugging increased temporarily due to faildelay of 86400
                    Sending messages to xxx (username removed)
                    ... used 53 dbqueries
                    ... used 0.32096004486084 seconds
                    Adhoc task failed: mod_forum\task\send_user_notifications,Failed opening required '/phpmailer/moodle_phpmailer.php' (include_path='/app/data/moodle/lib/pear:.:/usr/share/php')
                    
                    girishG 1 Reply Last reply
                    0
                    • C ccfu

                      @girish said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

                      @ccfu can you check if you installation has that value set?

                      Yes, it does.

                      @girish said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

                      @ccfu said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

                      but unfortunately the solution to allow cron via browser hasn't worked for me

                      This shouldn't be required. The package already runs cron. can you run /usr/local/bin/gosu www-data:www-data /usr/bin/php /app/code/new/admin/cli/cron.php ?

                      Yes, that runs and completes successfully. There are also several other tasks completing regularly without issue.

                      The error I am getting at /admin/tasklogs.php is:

                      Execute adhoc task: mod_forum\task\send_user_notifications
                      Adhoc task id: 32
                      Adhoc task custom data: ["1"]
                      ... started 21:14:29. Current memory use 31.7 MB.
                      Debugging increased temporarily due to faildelay of 86400
                      Sending messages to xxx (username removed)
                      ... used 53 dbqueries
                      ... used 0.32096004486084 seconds
                      Adhoc task failed: mod_forum\task\send_user_notifications,Failed opening required '/phpmailer/moodle_phpmailer.php' (include_path='/app/data/moodle/lib/pear:.:/usr/share/php')
                      
                      girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #16

                      @ccfu think I might have found the problem. The cron job has to be run from a different directory. Probably why it's not picking the config correctly. Can you update to v2.3.1-1 and check?

                      C 1 Reply Last reply
                      1
                      • girishG girish

                        @ccfu think I might have found the problem. The cron job has to be run from a different directory. Probably why it's not picking the config correctly. Can you update to v2.3.1-1 and check?

                        C Offline
                        C Offline
                        ccfu
                        wrote on last edited by
                        #17

                        @girish

                        Will do that this evening and get back to you. Thanks for looking into this.

                        C 1 Reply Last reply
                        1
                        • C ccfu

                          @girish

                          Will do that this evening and get back to you. Thanks for looking into this.

                          C Offline
                          C Offline
                          ccfu
                          wrote on last edited by
                          #18

                          @girish

                          I have updated to v2.3.1-1 and can confirm that this has resolved the problem. Thank you.

                          girishG 1 Reply Last reply
                          2
                          • C ccfu

                            @girish

                            I have updated to v2.3.1-1 and can confirm that this has resolved the problem. Thank you.

                            girishG Offline
                            girishG Offline
                            girish
                            Staff
                            wrote on last edited by
                            #19

                            @ccfu whoa, didn't expect that 🙂 thanks for verifying.

                            1 Reply Last reply
                            1
                            • jdaviescoatesJ Offline
                              jdaviescoatesJ Offline
                              jdaviescoates
                              wrote on last edited by
                              #20

                              I'd guess the update that happened last night is why I received an email around 3am this morning saying there was a new login to my account on 12 May 2022 😆

                              I use Cloudron with Gandi & Hetzner

                              C 1 Reply Last reply
                              2
                              • jdaviescoatesJ jdaviescoates

                                I'd guess the update that happened last night is why I received an email around 3am this morning saying there was a new login to my account on 12 May 2022 😆

                                C Offline
                                C Offline
                                ccfu
                                wrote on last edited by
                                #21

                                @jdaviescoates

                                I made sure to remove the queued adhoc tasks before updating to prevent that from happening and users receiving notifications of past events. At least you now know that adhoc tasks are working again in your installation 😆

                                jdaviescoatesJ 1 Reply Last reply
                                3
                                • C ccfu

                                  @jdaviescoates

                                  I made sure to remove the queued adhoc tasks before updating to prevent that from happening and users receiving notifications of past events. At least you now know that adhoc tasks are working again in your installation 😆

                                  jdaviescoatesJ Offline
                                  jdaviescoatesJ Offline
                                  jdaviescoates
                                  wrote on last edited by
                                  #22

                                  @ccfu said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

                                  @jdaviescoates

                                  I made sure to remove the queued adhoc tasks before updating to prevent that from happening and users receiving notifications of past events. At least you now know that adhoc tasks are working again in your installation 😆

                                  Thankfully in my case I don't yet actually have any users. I just installed to have a play around (because I do have plans to run some online courses) and haven't even really got around to doing that yet

                                  I use Cloudron with Gandi & Hetzner

                                  1 Reply Last reply
                                  0
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                    • Login

                                    • Don't have an account? Register

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • Bookmarks
                                    • Search