Yote::Cron is a subsystem in Yote that functions like a cron, allowing scripts to be run inside Yote. Rather than use config files, this uses Yote objects to control the cron jobs. A cron editor is part of the Yote admin page.
The Yote::Cron is set up on the yote system and runs every minute, checking if it should run any method that is attached to a yote object. It is a limited version of a cron system, as it for now only registers methods with minutes and hours.
The Yote::Cron's public methods can only be called by an account with the __is_root flag set.
Ads an entry to this list. Takes a Yote::Obj that has the following data structure :
* name - name of script to run * enabled - if true, this cron is active * script - what to run * repeats - a list of hashes with the following values : * repeat_infinite - true if this will always be repeated * repeat_times - a number of times to repeat this; this decrements * repeat_interval - how many seconds to repeat this * scheduled times - a list of epoc times this cron should be run * next_time - epoc time this should be run next (volatile, should not be set by user) * last_run - time this was last run (volatile, should not be set by user)
Returns a list of the entries that should be run at the time this was called.
Marks this entry as done. This causes any repeat_times to decrement, and removes appropriate scheduled times.
This recalculates the next time this entry will be run.
Eric Wolf firstname.lastname@example.org http://madyote.com
Copyright (C) 2011 Eric Wolf
This module is free software; it can be used under the same terms as perl itself.