I'm trying to create scheduled tasks.
But its not useful. Example I can't schedule task from week to week. How can I make like Cron Job?
Code Select
function tasks()
{
NewTimer("tasks",60000,1);
local now = date()
if(now.hour.tointeger() == 00)
{
SetWeather( 7 );
}
if(now.hour.tointeger() == 06)
{
OffCarLights();
}
if(now.hour.tointeger() == 18)
{
SetWeather( 5 );
}
if(now.hour.tointeger() == 20)
{
OpenCarLights();
}
}
But its not useful. Example I can't schedule task from week to week. How can I make like Cron Job?