Properties

$instance

$instance : null

Singleton.

Type

null

Methods

instance()

instance() : self

MainWP Cron Instance.

Returns

self —

$instance

__construct()

__construct() 

MainWP_System_Cron_Jobs constructor.

Run each time the class is called.

init_cron_jobs()

init_cron_jobs() 

Method init_cron_jobs()

Instantiate Cron Jobs.

init_cron()

init_cron() 

Method init_cron()

Build Cron Jobs Array & initiate via init_mainwp_cron()

init_mainwp_cron()

init_mainwp_cron(mixed  $useWPCron, mixed  $cron_hook, mixed  $recurrence) 

Method init_mainwp_cron()

Schedual Cron Jobs.

Parameters

mixed $useWPCron

Wether or not to use WP_Cron.

mixed $cron_hook

When cron is going to reoccur.

mixed $recurrence

Cron job hook.

cron_active()

cron_active() : void

Method cron_active()

Check if WP_Cron is active.

get_cron_schedules()

get_cron_schedules(array  $schedules) : array

Method get_cron_schedules()

Get current Cron Schedual.

Parameters

array $schedules

Array of currently set scheduals.

Returns

array —

$scheduales.

get_timestamp_from_hh_mm()

get_timestamp_from_hh_mm(mixed  $hh_mm) : \MainWP\Dashboard\time

Method get_timestamp_from_hh_mm()

Get Time Stamp from $hh_mm.

Parameters

mixed $hh_mm

Global time stamp variable.

Returns

\MainWP\Dashboard\time —

Y-m-d 00:00:59.

cron_updates_check()

cron_updates_check() 

Method cron_updates_check()

MainWP Cron Check Update

This Cron Checks to see if Automatic Daily Updates need to be performed.

start_notification_daily_digest()

start_notification_daily_digest(array  $email_settings, boolean  $plugin_automaticDailyUpdate, boolean  $theme_automaticDailyUpdate, boolean  $mainwpAutomaticDailyUpdate, boolean  $plain_text, array  $sites_ids = false, boolean  $to_admin = false, object  $email_site = false) : boolean

Method start_notification_daily_digest().

Send email notification.

Parameters

array $email_settings

Email settings.

boolean $plugin_automaticDailyUpdate

Auto update plugins daily.

boolean $theme_automaticDailyUpdate

Auto update themes daily.

boolean $mainwpAutomaticDailyUpdate

Auto update core daily.

boolean $plain_text

Text format value.

array $sites_ids

Array of websites ids (option).

boolean $to_admin

Send to admin or not.

object $email_site

current report site.

Returns

boolean —

True|False

refresh_saved_fields()

refresh_saved_fields(boolean  $diff_day) 

Method refresh_saved_fields().

Clear settings field values.

Parameters

boolean $diff_day

Either different day.

start_notification_http_check()

start_notification_http_check(boolean  $plain_text) : boolean

Method start_notification_http_check().

Prepare to send http check notification.

Parameters

boolean $plain_text

Text format value.

Returns

boolean —

True|False

start_notification_uptime_status()

start_notification_uptime_status(boolean  $plain_text) : boolean

Method start_notification_uptime_status().

Prepare uptime status notification.

Parameters

boolean $plain_text

Text format value.

Returns

boolean —

True|False

cron_check_websites_health()

cron_check_websites_health() 

Method cron_check_websites_health()

Cron job to check site health.