Travis Simmers
Travis Simmers

Reputation: 19

Batch file runs fine but not in Task Scheduler

Afternoon everyone,

I've tried to research this topic in depth and I cannot come to a conclusion for my problem. I'm trying to automate a batch file in Task Scheduler to execute two SSIS packages. Currently when I attempt to execute the scheduled task (either waiting for its set schedule or running on demand), task scheduler will show that the task has completed successfully, the "Status" will continue to say "Running" but the destination files are never created/re-created. This is the script:

dtexec /f "D:\SSIS\Folder\Folder\Folder\Package.dtsx"
dtexec /f "D:\SSIS\Folder\Folder\Folder\Package.dtsx"

The SSIS is supposed to pull information from SQL and export it to a CSV which it does wonderfully... If I execute this script in CMD, Powershell, or run my batch file directly.

About my environment:

So here is what I've tried:

Thanks for any input anybody can give me, it's greatly appreciated.

Upvotes: 1

Views: 8380

Answers (1)

Madison Leopold
Madison Leopold

Reputation: 415

I know this is a super old post, but I just had the same issue and wasn't successful with any other popular solutions around StackOverflow, so I want to put out an alternative solution for anyone still struggling!

When in doubt, double check the user account in the Security Options under Properties (right-click on Task > Properties > first page under "Security Options").

Even though the user that it had selected by default should have permission to execute the script, I had to change the user account to a user with a higher privilege (I'm on a work computer). For me, this meant I had to select the Administrator group on my particular desktop environment.

Upvotes: 1

Related Questions