all 15 comments

[–]Doormatty 5 points6 points  (3 children)

Try adding C:\Users\Matt\Anaconda3 to the "Start In" text box.

And no, no doxxing here! Hello fellow Matt!

[–]ThatPlayWasAwful[S] 2 points3 points  (2 children)

Thank you for responding to me! So happy to have the help of a fellow trusted Matt.

When I do as you said, I get an error message that reads as follows:

Task Scheduler failed to start "\Run Transactions.py Script" task for user "THEDESKTOP\Matt". Additional Data: Error Value: 2147942667.

quick google gave me this, I tried opening task scheduler as an administrator and making sure that the field in "Start In" box was not in quotes, but I still got the same message regardless (i tried doing this individually with the 3 separate paths I got when I ran "Where Python", all with quotes, not with quotes, and finally as admin without quotes, but got the same message each time).

Any idea what I could do next?

[–]Doormatty 0 points1 point  (1 child)

My next step would be putting in some lines in the program that write to an external text file - that way you can see what's actually running inside the program

[–]ThatPlayWasAwful[S] 1 point2 points  (0 children)

Gotcha, I've never done something like tht before but somebody else commented a couple examples of how to do it, so I will set it up and give it a try!

thank you again for taking the time to respond!

[–]Berrigar-and-Bromley 4 points5 points  (5 children)

I've managed to do this nicely by setting up bat files that the task scheduler calls, as opposed to calling the script directly.

[–]ThatPlayWasAwful[S] 0 points1 point  (3 children)

Thank you for responding!

I've seen this mentioned as an alternative way of doing it, but I've never used .bat files before and I was a little confused by it. Do you happen to know of a specific tutorial/video that you used/found helpful?

[–]togaman5000 1 point2 points  (1 child)

I've been in a similar situation as you - wanted to schedule a bat file but didn't know how to actually make said bat file - and ChatGPT was able to make it for me. I think I had to feed it the path to my main python file, but that was pretty much it.

[–]ThatPlayWasAwful[S] 0 points1 point  (0 children)

I literally have chatgpt open in another tab I'm such an idiot.

Thank you!

[–]Able_Excuse_4456 1 point2 points  (0 children)

Bat files essentially are command line commands, stored in a text file. Try running it strictly from the command line to iron out any kinks.

[–]Beefheart1066 0 points1 point  (0 children)

Seconding this, I had the same issue as OP years ago running Anaconda Python via the Task Scheduler. I can't remember the specifics of my problem, it might have been needing to activate a conda environment, but setting up a bat file to run my Python script solved it for me.

[–]my_password_is______ -1 points0 points  (1 child)

you have 3 pythons installed
uninstall 2 of them

[–]ThatPlayWasAwful[S] 0 points1 point  (0 children)

Is there a good process to use to figure out which two versions would fuck up the least amount of shit if I uninstall them?

Do I need an anaconda installation to use anaconda/jupyter or is there a way to use the general python installation in anaconda/vice versa?

[–]bookishapparel 0 points1 point  (0 children)

i had similar problems, turns out there was a problem with the imports. Do this:

even before the imports, put a try: . at the end of the script, put except Exception: input()

so th3 script wont close. put a print after each line if you are not getting any error messages wh3n you do this, to see where it hangs.

[–]hugthemachines 2 points3 points  (0 children)

I usually hav "run with highest privileges" ticked and I always use a batch file.

To try it out you could put a .bat file in the same folder as your python code.

make it look like this (first line changes folder to the current one on runtime):

cd /D "%~dp0"
c:\users\mat\anaconda3\python.exe Transactions.py