Welcome Guest, Not a member yet? Register   Sign In
How run a script on host without internet?
#11

(11-27-2017, 09:07 AM)PaulD Wrote:
Quote:So if i run script file with cronjob,actually it run local in server,is it?
Yes, a cron job runs on your web server. (Or as reactionstudio said above, on whatever machine you are running the scripts on)

Quote:And the server is stronger than my system,is it?
Well, what do you mean by 'stronger'?
A web server is a computer. Your local system is a computer. You are asking if unknown computer A is 'stronger' than unknown computer B. That is clearly impossible to answer.

As natanfelles said above, your webserver will normally be configured to run any request for a limited amount of time, say 30 seconds. If your script takes longer than that set time, then it will time out and stop running.

Again, as natanfelles said next, in this situation you would make your job into small manageable chunks that do not time out, and run them say every 5 minutes until the job is done.

Hope that helps,

Paul.

PS Sometimes for small tasks that only need to be run once in a while, I would write a small script to do it that I fire manually via a url, rather than a cron job. (Obviously with authorisation and authentication that it is me, and disabling the script when not needed.) It is often, at least for me, quicker to do this than working with cron.

Yes it is right
Thanks my friend for all replies
Reply


Messages In This Thread
RE: How run a script on host without internet? - by omid_student - 11-27-2017, 01:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB