Plugin to Access Cron | Forum

I am developing a plugin. I need to run a cron often to make my plugin work perfectly.

How can I invoke oxwall cron for my plugin.
I created a cron.php file in the plugin folder and added some code by taking other plugins as reference.

Is there anything else to do for the plugin specific cron to work ?
The question here is how to do cron jobs specific for my plugin.
When I involve run() method, cron is working.

I want to schedule the plugin cron based on the time/hour provided by the user. How can I do this?

EX: Daily or Weekly or Monthly based on Day and Time provided by user.

The Forum post is edited by Purusothaman Ramanujam May 15 '12
Any help? It's me only posting in this topic. No help from Oxwall team. :(
Team
Sardar May 17 '12
You can easily specify the period of your cronjob using parameter in `addJob` method. Period should be specified in minutes. Examples:


// once a day

$this->addJob('checkPluginUpdates', 60 * 24); 


// every minute 

$this->addJob('deleteExpiredOnlineUserProcess', 1);

How about the following cases:

in a particular day of a month(2nd day of every month at 6 PM)
in a particular day of a week(Tuesday 8 PM every week)
Team
Michael I. Dec 21 '12
Topic was moved from Plugins.