public static function get_default_scheduled_task($classname) {
        $task = self::get_scheduled_task($classname);
        $componenttasks = array();

        // Safety check in case no task was found for the given classname.
        if ($task) {
            $componenttasks = self::load_default_scheduled_tasks_for_component($task->get_component());
        }

        foreach ($componenttasks as $componenttask) {
            if (get_class($componenttask) == get_class($task)) {
                return $componenttask;
            }
        }

        return false;
    }
public static function get_default_scheduled_task($classname) {
        $task = self::get_scheduled_task($classname);
        $componenttasks = array();

        // Safety check in case no task was found for the given classname.
        if ($task) {
            $componenttasks = self::load_default_scheduled_tasks_for_component($task->get_component());
        }

        foreach ($componenttasks as $componenttask) {
            if (get_class($componenttask) == get_class($task)) {
                return $componenttask;
            }
        }

        return false;
    }
public static function get_default_scheduled_task ( $ classname ) { $ task = self :: get_scheduled_task ( $ classname ) ; $ componenttasks = array ( ) ; // Safety check in case no task was found for the given classname. if ( $ task ) { $ componenttasks = self :: load_default_scheduled_tasks_for_component ( $ task -> get_component ( ) ) ; } foreach ( $ componenttasks as $ componenttask ) { if ( get_class ( $ componenttask ) == get_class ( $ task ) ) { return $ componenttask ; } } return false ; }
This function load the default scheduled task details for a given classname.

@param string $classname
@return \core\task\scheduled_task or false
This function load the default scheduled task details for a given classname .