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, integer  $time = false) : \MainWP\Dashboard\time

Method get_timestamp_from_hh_mm()

Get Time Stamp from $hh_mm.

Parameters

mixed $hh_mm

Global time stamp variable.

integer $time

Time of day.

Returns

\MainWP\Dashboard\time —

Y-m-d 00:00:59.

get_next_time_automatic_update_to_show()

get_next_time_automatic_update_to_show() : mixed

Method get_next_time_automatic_update_to_show()

Get websites automatic update next time.

Returns

mixed —

array

check_conds_to_run_auto_update()

check_conds_to_run_auto_update(integer  $next_time, integer  $run_timestamp = false, integer  $frequence_in_seconds = false) : boolean

Method check_conds_to_run_auto_update()

To check conditionals to run auto update checking.

Parameters

integer $next_time

Next time to run.

integer $run_timestamp

Runtime daily.

integer $frequence_in_seconds

frequence running in seconds.

Returns

boolean —

Valid or not to run.

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  $plain_text, array  $sites_ids = false, object  $email_site = false) : boolean

Method start_notification_daily_digest().

Send email notification.

Parameters

array $email_settings

Email settings.

boolean $plain_text

Text format value.

array $sites_ids

Array of websites ids (option).

object $email_site

current report site.

Returns

boolean —

True|False

refresh_saved_fields()

refresh_saved_fields() 

Method refresh_saved_fields().

Clear settings field values.

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

cron_deactivated_licenses_alert()

cron_deactivated_licenses_alert() 

Method cron_deactivated_licenses_alert()

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.