[英]Local Plugin tasks are not showing up in the schedule tasks list in moodle
以這種方式嘗試,時間值應該是字符串而不是數字。 它們必須匹配 unix cron 的語法,但阻塞應該保持不變。
$tasks = array(
array(
'classname' => 'tool_mobilechathelper\task\sync_chats',
'blocking' => 0,
'minute' => '0',
'hour' => '22',
'day' => '*',
'dayofweek' => '*',
'month' => '*'
),
);
另外,確保在你的任務 class 中有命名空間,
namespace tool_mobilechathelper\task;
並升級你的version.php
,然后運行php admin/cli/upgrade.php
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.