Sleep and cron limit

http://fssp.rf.gd

Hey. I’m from Russia and I’ve written a script that makes a request to the tax service in our country and checks if I have debts (It’s legal. Our tax service has its own API). I would use hosting in Russia, but Telegram not worked in our country, which I need to get notifications in case the script finds a debt.

Tell me, is it possible to activate sleep mode in my account and change cron time limit from 5 seconds to 20?

I need “Sleep” in order to make delays in case the tax server is processing the request for a long time. Sometimes the request is executed within 6 seconds, and sometimes it takes 1 second to execute the request. “Sleep” in my script is for 2 seconds to allow the server to process my request.

I’m sorry, but it’s not possible to extend the limits on cron jobs on our hosting. Please keep in mind that we provide a website hosting service, not a data processing service, so the limits we set are not optimized for long running background tasks.

I do wonder though, how does this tax API work that a sleep in your script would help? If the request is slow, wouldn’t it just keep your API call open and your PHP script old hold? Or does it give you a job ID or something which you need to check again later?

If you have a job ID, you could store it somewhere and just retrieve the output on the next cron interval.

3 Likes

I can without “sleep” in principle do, just a script will spam our IRS server. Or, like you said, do it through cron. With “sleep”, it was just easier to do than with cron. But the cron runtime problem is still open. Since the server is at a long distance, there is a chance that the request can run for more than 5 seconds.

It’s just not very profitable for me to order a whole hosting for this script.

Anyway - thanks for the answer. Sorry to bother you. I wish you good health.

If possible, please remove this top.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.