Reputation: 907
How can you do a cron job with php without creating a cron Job on the server cron software
Is that even possible ?
EDIT as I added in a comment I've seen a script called piwik who does that kind of stuff, e.g. Sends emails without any cron job
Upvotes: 0
Views: 786
Reputation: 6052
set_time_out(0);
ignore_user_abort(true);
while(1){
sleep(1); // sleep one sec every time.
//do your stuff here..
//you can use time() with IF to make it execute something only on specific timing.
}
Not recommended.
Upvotes: -2
Reputation: 32290
I think the best you could do is make a cron job that periodically checks a file X for cron jobs and runs them. Then all you would have to do is add jobs to X instead of to cron.
Upvotes: 5
Reputation: 11106
No.
You can try online services like http://pingability.com/
Cron is ideal though.
Upvotes: 0