Reputation: 15
I am using linux server. I have cron jobs running every 4 hours. For some reason I will restart my apache service. My question is, while restarting the apache service, will this affects currently running cron tasks? Thanks
Upvotes: 0
Views: 812
Reputation: 86524
A restart of Apache should only affect cron jobs if for some reason they're in the process of making an HTTP request to the web server, and only for that one run of the job. (Future runs are new processes, and won't be affected unless the failed job is particularly badly written and somehow makes the resources it was using unusable.)
Even then, if Apache is restarted graceful
ly, it'll try to switch things over transparently and wait til a child process's existing requests are finished before killing it off and replacing it. Ideally, in that case, nothing will even notice it was stopped or restarted.
Upvotes: 0