Scheduled tasks API in php