Jump to content

Lazycron not working


benbyf
 Share

Recommended Posts

I get messages turning up fine in my logs when used in my templates but not working (nothing happens) in my module for some reason. Here's what I have roughly:

class customModule extends WireData implements Module, ConfigurableModule {

	public static function getModuleInfo() {
		return array(
			...
			'autoload' => true,
			'requires' => "LazyCron",
		);
	}
	private $cron_check = "everyMinute";

	public function init() {
		// add hooks to CRON
	    $this->addHook("LazyCron::every30Seconds", $this, 'checkFeedForNewPages');
	}


	public function checkFeedForNewPages(HookEvent $e){
		wire()->log->save('messages', 'working again');
	}
}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...