Cron job

Is there anyway i can make a script to automatically execute itself at a specific time of the day without using cron on my cPanel, because right now am using cron to perform that function???
Please i need a help…

Yes, but a cron job is usually the best way to do it. Why don’t you want to use a cron job?

Yes, we would like to know why you don’t wana use cron?

Is not that i dont really want to use cron, but I was thinking there will be a way i can write my own script that will also perform the same function, but if there is not, no problem… I will continue to use Cron Job…
thank you.

Well, two other common, but less desirable approaches are:

-Do the tasks in a lazy manor. When the script is executed, it looks to some history to see when the last time it ran the task was. If the task needs to be run, it does so, and then records that it ran, and what time. So, the task will always be ran a bit late. You might use regular http web requests to trigger this script. If no visitors come, the script never runs.

There’s also some websites that sell a psuedo cron service, where they just request a url on your website at a specified schedule. This would be used to trigger the above script.

-Write a script that runs forever in a while(true) loop. It sleep()'s for a period of time, wakes up and checks if a job needs to be done, does any work needed, goes back to sleep for a while. This is how the cron program works.

A similar post from earlier today, mentioning poor man’s cron.

Hey, I’ve got the wheel on my car… but I’d rather not use it… how do I build a new wheel that acts and functions just like the existing wheel but isn’t the existing wheel? How would I re-invent said wheel?

Thanks, I think this is what i wanted to know, i will try it out now…