Skip to main content
Source Link

Scheduled Job Succeeds, Does Nothing; Manual Job Succeeds, Performs Requirements

I have a job in SQL Server Agent (2012 Instance) that deletes rows from a table. When I manually run the job, it succeeds without issue and in reviewing the table, does exactly what I want it to do.

When I've set it to an automatic schedule, the history indicates that the job has successfully run each step, yet in reviewing the table, the records are not deleted. The job is set to enabled, and the history shows that it's run on the schedule, even with no records being removed. If I run it manually, suddenly I see the correct results in the table.

Each step is run under the same login, for instance EXECUTED as user: NT ACCOUNT\SQLSRVAGENT, whether I run the job manually or it's run on its schedule. The only difference I see between running it manually or the automated schedule is what invokes the job. When it's the schedule, it reports The Job was invoked by Schedule 1 (Name) vs. when I run it manually, it reports, The job was invoked by User YouUser. Note that this standard setup exists on other servers and doesn't create the same issue, so even though this is the only discrepancy I can find between how the job is run (manual vs. schedule), this doesn't look to be the issue.

Any other idea what could be causing this?