Closed (works as designed)
Project:
Elysia Cron
Version:
7.x-2.1
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
22 May 2012 at 16:01 UTC
Updated:
9 Oct 2012 at 09:39 UTC
Hi,
I have a custom module in which in its hook_cron, I call 2 different functions to be triggered during cron.
In the Elysia cron configuration page, I am able to only set a cron time for this custom module's cron tasks as a whole. How can I explicitly split the 2 tasks within the hook_cron to run at different times?
function custom_module_cron() {
//Cron job 1
//This needs to run once a week (0 0 * * 0)
custom_module_month();
//Cron job 2
//This needs to run once a day (* 19 * * *)
custom_module_week();
}
Thanks in advance!
Comments
Comment #1
apramakr commentedFigured it. Looked in the API.txt file in the Elysia cron module, the hook_cronapi helped.
Thanks!
Comment #2
apramakr commentedComment #3
lguigo commentedIn this case, i use elysia script system
In admin/config/system/cron/settings, in script textarea, I write for example :
*/15 * * * * mymodule_cron_test('string_var_example');and in mymodule.module I create a function :
it can handle multiple tasks in the same module