Although we can delete a running timer job from Central administration Monitoring section, but is there anything that we need to implement in a custom timer job so that the job stops as soon as it is deleted from Central Administration or PowerShell cmdlet?
Because, when i delete the running custom job (one time job) from Central Administration, the job continues to run although Central Administration shows that its no more there.
I thought that I might need to override the Delete() method of SPJobDefinition in my custom job, set a volatile bool flag in it and use this flag in Execute() method to find whether the job is deleted or not. In case it is deleted, this method should exit without processing further items. But for some reason, I ain't getting the updated value of this volatile bool flag in the execute method even though the delete method is called and I verified it in debug mode.
Stuck.