Hi,
Several batch jobs in our system were created by external consultants through their personal users. Now these consultants have left the company, so we plan to delete their users.
I have read several posts saying that deleting the user will also delete the batch job.
However, a while back we deleted one of the users and it did not delete the batch job. The only thing we had to do was to change the "run by" user.
Is it safe to delete the user who created the batch job?
Hi Gaute,
Microsoft made some changes after I wrote my blog Life's a batch... - Dynamicspedia. They probably implemented one of the ideas without updating the status on the idea.
When there are pending batch jobs, you will now get a dialog warning about available batch jobs. If the batch job is in e.g. an executing state, an AOS validation will fail and not delete the batch job.
As written in my blog, it would be better to use a service account. You can copy the batch to fully have dependency on the service account and then delete the obsolete users including the old batch jobs.
As I wrote in the first post we have already deleted a user that is still in the "Created by" field. The batch jobs created by this user still exist and work as intended. Hence, it does not seem like the batch jobs are automatically being deleted in every case.
Does anyone know what affect if the batch jobs are being deleted or not?
Above articles are right, I have done quick test, If you delete Created By user then related batch jobs will also be deleted. If you just delete Run by user (Assuming Run by user is different from Created By) then Batch will still exists.
If you want to be sure, You can test it in your Devbox.
These posts state that deleting the "created by" user will also delete the batch jobs.
Are the information in these posts outdated?
Hi Gaute, I don't think deleting a user will delete the batch job. As you mentioned, we generally change the Run by user first in batch job and then delete the user.
It's fine to delete users and change the run by , it won't affect anywhere.
André Arnaud de Cal...
291,979
Super User 2025 Season 1
Martin Dráb
230,848
Most Valuable Professional
nmaenpaa
101,156