0

Link for python code running successfully through task scheduler

Image link for job detail on scheduler

When running through job scheduler, python script is not creating file in script directory (Scraped data in csv files). TF-IDF is working perfect but I can't find files.

1 Answer 1

1

It is probably related to your environment. What user is it running as? You may try putting in a few lines to see where it thinks it is running.

import os

# Print current working directory 
print "Current working dir : %s" % os.getcwd()

or go one step further and actually change to the dir you want before processing begins.

# First go to the "/var/www/html" directory
os.chdir("/var/www/html" )
Sign up to request clarification or add additional context in comments.

1 Comment

Are you explicitly setting the path to where you want your files to go? If you run it manually does it work? Also, since it is windows you may need to do some trickery with your paths. I haven't written anything for a windows box for some time so I can't remember for sure but you may need to escape your backslash chars in your path. A sample of your code would help a lot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.