Vigraman Padmanaban
Vigraman Padmanaban

Reputation: 15

Does restating apache affects running cron jobs in the server?

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

Answers (2)

cHao
cHao

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 gracefully, 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

Dondi Michael Stroma
Dondi Michael Stroma

Reputation: 4800

No, Apache and cron are not related at all.

Upvotes: 2

Related Questions