I am unable to set cron time for you to under one minute on my devoted server. I want it to operate every just a few seconds since it calls betfair api and information are highly time dependent. Please advise.
If you want to call employment every 15 second, avoid using cron. cron is made for asking for jobs to become done later.
Rather, following the parent finishes the task, sleep for just a few seconds then call the kid script, then exits. The kid script can perform its job, sleep for 15 second then call the following script. Lather, Rinse, Repeat.
In case your server does not have enough time limit, then you definitely don't even have to spawn a young child script. Just sleep ever just a few seconds, do your factor, sleep 15 second, perform the next factor, and so forth. A sleeping script does not consume CPU, although it do consume RAM. But that is much better than cycling your host's PID that might cause your host to visit uneasy.
Cron only allows you take things as quickly as when a minute.
Things I would do is perform the 15 second timings within your script.
- Perform parent script when a minute.
- Execute children scripts every just a few seconds within that script before it is available along with a new cycle starts.