I want to know how I can schedule a dynamic(auto populated data) function to auto run everyday at saved time?
Let\'s say I have a form that once the button is clicke
If I understand correctly, I think something like this may work for you, using the hours as keys to the function you want run, in a cron set to run every two hours:
$listArray = Array(8=>"list1_function",10=>"list2_function");//etc...
$hour = Date("G");
if(array_key_exists($hour,$listArray))
{
$listArray[$hour]();
}
function list1_function()
{
echo "do list 1 stuff";
}
function list2_function()
{
echo "do list 2 stuff";
}