Php crontab


What I am trying to do is use PHP to create Cron Job on my linux server. I tried
exec(“crontab -u jancom $pathtophpfile”, $response), but it returns empty array.

I also want to set time to when should the crontab execute the task.


also I want to run each task JUST ONCE

I was trying to find something like this and was unable to. I would love it if someone could find it. Not sure if it’s possible though.

maybe if I could also setup time based on time() function…

Can anyone help?

A friend told me its not possible to do it.

So… :frowning: need to find a way around.

Maybe if I make database, put in scheduled tasks, than create php file that is ran by crontab every minute checking which tasks in database have to run and run them?