HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-172-31-4-197 6.8.0-1036-aws #38~22.04.1-Ubuntu SMP Fri Aug 22 15:44:33 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wordpress/wp-content/plugins/hide-my-wp/controllers/Cron.php
<?php
/**
 * Background Cron action
 *
 * @file The Cron file
 * @package HMWP/Cron
 * @since 4.0.0
 */

class HMWP_Controllers_Cron {

	/**
	 * HMWP_Controllers_Cron constructor.
	 */
	public function __construct() {
		add_filter( 'cron_schedules', array( $this, 'setInterval' ) );

		//Activate the cron job if not exists.
		if ( ! wp_next_scheduled( HMWP_CRON ) ) {
			wp_schedule_event( time(), 'hmwp_every_minute', HMWP_CRON );
		}
	}

	/**
	 * Add a custom schedule interval to the existing schedules.
	 *
	 * @param  array  $schedules  An array of the existing cron schedules.
	 *
	 * @return array The modified array of cron schedules with the new custom interval added.
	 */
	function setInterval( $schedules ) {

		$schedules['hmwp_every_minute'] = array(
			'display'  => 'every 1 minute',
			'interval' => 60
		);

		return $schedules;
	}

	/**
	 * Executes the scheduled cron job to verify and update cache plugins.
	 *
	 * This method checks the cache plugins and updates the paths in the cache files
	 * to ensure compatibility with the current configuration.
	 *
	 * @return void
	 * @throws Exception
	 */
	public function processCron() {
		// Check the cache plugins and change the paths in the cache files.
		HMWP_Classes_ObjController::getClass( 'HMWP_Models_Compatibility' )->checkCacheFiles();
	}


}