Difference between revisions of "Run Python script scheduled on Windows Server"

From ToWaSo
Jump to navigation Jump to search
 
Line 16: Line 16:
 
[[File:Edit task name.png|500px|thumb|center|Edit task name]]
 
[[File:Edit task name.png|500px|thumb|center|Edit task name]]
  
== Run task as system.png ==
+
== Run task as system ==
 
Depending on your script it may need different access permissions
 
Depending on your script it may need different access permissions
 
[[File:Run task as system.png|500px|thumb|center|Run task as system]]
 
[[File:Run task as system.png|500px|thumb|center|Run task as system]]

Latest revision as of 07:54, 11 June 2020

This example shows how to automate execution of Python scripts using the Scheduler from Windows Server. In this example I'm assuming that the python.exe is in your PATH.

You can try running your command in a command prompt first:

python C:\pathtoyourscript\myScript.py

Open Windows Tasks Scheduler

Open Windows Tasks Scheduler

Create new task

Create new task

Edit task name

Edit task name

Run task as system

Depending on your script it may need different access permissions

Run task as system

Create task trigger

Create task trigger

Edit task schedule

Edit task schedule

Create task action

Create task action

Edit task action

Insert "python" in program name and the full path to your script under arguments.

Edit task action