projectkudu/kudu — pull request #1119 by amitapl (2014-04-21 21:51:57+00:00)
Title: Added shutdown notification for webjobs to be able to gracefully shutdown jobs.

For continuous - Before stopping write a file to a known (through environment setting) location to let the job know it's going to stop, then after 5 seconds if the job is not stopped, kill it.
For triggered - Wait for a default of 30 seconds for the job to go down and after that continue (and the process will get killed).
The waiting time in both cases is configurable using settings.job file.
Fixes #1068