O
O
opan2017-08-15 14:33:37
Python
opan, 2017-08-15 14:33:37

Running python script on windows 2012 schedule?

You need to run a python script with parameters in the windows scheduler.
Now it only starts if I'm logged in. If you press logoff, the script does not run. The variables are registered, the rights to everything are there, the paths are full, the local security settings are set. I tried to create a task in a million ways, probably, I specified both the launch path and arguments, etc. It does not work. If you are logged in, everything is ok. and manually works and according to the schedule.
Can anyone recommend something good? Thank you.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
X
x67, 2017-08-15
@x67

When creating a task, enable the option run when not logged onor

выполнять вне зависимости от регистрации пользователя
1f729092c58045b5903c917b0c958a70.png

O
opan, 2017-08-15
@opan

Yes, this is perhaps the most obvious jackdaw, in the most prominent place. Of course it's installed. Experimentally established that the batch file is launched, but the Python script is not inside.

D
Dimonchik, 2017-08-15
@dimonchik2013

in batch file only
to file start with

dir_path = os.path.dirname(os.path.realpath('W:/Dj/cron_import_data.py'))
sys.path.insert(0, dir_path)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question