How to make 2 different code run acording to different cron schedule? I have 2 different code running under hook cron like below:

function custom_module_cron(){

  // First here code run for posting nodes to Facebook pages 
    (this should run for cron tab Ist )


  // Second code runs for sending new posted links in form of digest 
     to users according to their selected hours. (This should run for cron tab 2nd )

}


For above process I have different cron tabs running on my server such as:

http://oexample.com/cron.php?cron_key=something7rsds

For Facebook at : 23:30,  23, 21,  and many more  hours

For Digest at : 7 , 8 , 10 and many more

How can we differentiate that each code run according to required hours.
Can we make different urls to run for different code  to prevent running of code at unwanted hours? I am using rough technique by using in_array for current time and hours in cron tab but thats very handy and I think its not solution.

Please suggest what I can do to make my codes run according to separate schedules ?

Thanks!
Adding a GET parameter should work. In your crontab edit the url and add something like &amp;type=facebook.

In the hook_cron implementation you should be able to catch the type via $_GET['type']