Habari\CronTab::add_weekly_cron PHP Method

add_weekly_cron() static public method

Add a new cron job to the DB, that runs weekly.
static public add_weekly_cron ( string $name, mixed $callback, string $description = '' ) : CronJob
$name string The name of the cron job.
$callback mixed The callback function or plugin action for the cron job to execute.
$description string The description of the cron job.
return CronJob
    static function add_weekly_cron($name, $callback, $description = '')
    {
        $paramarray = array('name' => $name, 'callback' => $callback, 'increment' => 604800, 'description' => $description);
        return self::add_cron($paramarray);
    }