Eli Y
Eli Y

Reputation: 907

Cron job with php

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

Answers (3)

Pheonix
Pheonix

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

cdmckay
cdmckay

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

Mob
Mob

Reputation: 11106

No.

You can try online services like http://pingability.com/

Cron is ideal though.

Upvotes: 0

Related Questions