This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I've built a really simple ETL, it has 1 command, RUN a bat file with a python script inside. If I run the file on the command it runs fine, if I run on Alteryx it runs fine, in Scheduler it fails with:
Start: Designer x64: Started running at 2017-02-07 15:24:21 Error: Tool #14: The external program "C:\Users\xxxx\Desktop\ETL-Alteryx\bigquery\donor_last_touch\donor_last_touch.bat" returned an error code: 1 End: Designer x64: Finished running in 3.9 seconds
This is most likely related to the user that is running the script. The scheduler uses a windows user, not your user account and so may not have access to the details inside the batch file. You can set up the 'Run As' user in System Settings on the machine with the scheduler.
Your other option is to add ' > C:\outputlog.log' to the end of the batch command to write the output of the cmd window to a log file and see what the failure is.
I had the same issue and fought with it for a few months. Finally resorted to calling Microsoft for some assistance. The fix isn’t something I would have ever found, so hopefully this helps others too. The script would run fine when I launched it in Powershell (and command line) but when it launched as a scheduled task it would run but not with expected results. Microsoft informs me that my issue is with running Excel in “non-interactive mode”, you require two directories to be created.
You have to create a folder (or two on a 64bit-windows): (32Bit, always) C:\Windows\System32\config\systemprofile\Desktop
With 64 bit Windows, it requires the second folder in addition to the first. So you will always need C:\Windows\System32\config\systemprofile\Desktop, and if you are using 64 Bit, you will need C:\Windows\SysWOW64\config\systemprofile\Desktop in addition.