# s2member/260927/src/includes/classes/cron-jobs.inc.php

s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls &amp; Member Access Subscriptions, version 260927. 92 lines.

- Page: https://pluginprobe.com/plugins/s2member/260927/code/src/includes/classes/cron-jobs.inc.php
- Raw: https://pluginprobe.com/plugins/s2member/260927/raw/src/includes/classes/cron-jobs.inc.php
- Modified: 2026-09-09T05:26:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/s2member/260927/code/src/includes/classes/cron-jobs.inc.php#L10-L20`.

```php
<?php
// @codingStandardsIgnoreFile
/**
 * Cron routines handled by s2Member.
 *
 * Copyright: © 2009-2011
 * {@link http://websharks-inc.com/ WebSharks, Inc.}
 * (coded in the USA)
 *
 * Released under the terms of the GNU General Public License.
 * You should have received a copy of the GNU General Public License,
 * along with this software. In the main directory, see: /licensing/
 * If not, see: {@link http://www.gnu.org/licenses/}.
 *
 * @package s2Member\Cron_Jobs
 * @since 3.5
 */
if(!defined('WPINC')) // MUST have WordPress.
	exit ("Do not access this file directly.");

if(!class_exists("c_ws_plugin__s2member_cron_jobs"))
{
	/**
	 * Cron routines handled by s2Member.
	 *
	 * @package s2Member\Cron_Jobs
	 * @since 3.5
	 */
	class c_ws_plugin__s2member_cron_jobs
	{
		/**
		 * Extends WP-Cron schedules to support 10 minute intervals.
		 *
		 * @package s2Member\Cron_Jobs
		 * @since 3.5
		 *
		 * @attaches-to ``add_filter("cron_schedules");``
		 *
		 * @param array $schedules Expects an array of WP_Cron schedules passed in by the Filter.
		 *
		 * @return array Return-value of inner routine.
		 */
		public static function extend_cron_schedules($schedules = array())
		{
			return c_ws_plugin__s2member_cron_jobs_in::extend_cron_schedules($schedules);
		}

		/**
		 * Conditionally schedules a single WP-Cron event.
		 *
		 * @package s2Member\Cron_Jobs
		 * @since 260902
		 *
		 * @param string $hook WP-Cron hook name.
		 * @param int $timestamp Unix timestamp. Defaults to now.
		 * @param array $args Optional event arguments.
		 *
		 * @return bool True if the event already exists or was scheduled successfully.
		 */
		public static function maybe_schedule_single_event($hook, $timestamp = 0, $args = array())
		{
			$hook = (string)$hook;
			$args = (array)$args;
			$timestamp = (int)$timestamp;

			if(!$hook)
				return FALSE;

			if(wp_next_scheduled($hook, $args))
				return TRUE;

			wp_schedule_single_event($timestamp > 0 ? $timestamp : time(), $hook, $args);

			return (bool)wp_next_scheduled($hook, $args); //260902 Verify for older supported WordPress versions.
		}

		/**
		 * Allows the Auto-EOT Sytem to be processed through a server-side Cron Job.
		 *
		 * @package s2Member\Cron_Jobs
		 * @since 3.5
		 *
		 * @attaches-to ``add_action("init");``
		 */
		public static function auto_eot_system_via_cron()
		{
			if(!empty($_GET["s2member_auto_eot_system_via_cron"]))
				c_ws_plugin__s2member_cron_jobs_in::auto_eot_system_via_cron();
		}
	}
}

```
