Python script

This shortcut type allows executing a Python script. You can find Python documentation and learn it on the official site:

Advanced Task Scheduler searches for Python executable (python.exe) in the directories listed in the PATH environment variable. You can also select Python executable directly in the option Use specific Python executable in the Scripts section of the Preferences window. You can download and install Python from its official site:

The arguments are passed to the Python scripts through the advscheduler dictionary. The following keys are passed: actionname, actiontime, actionschedule, actionsource, actionsourceextra, lasterrorcode, lastexitcode. Professional and Network Editions: all defined tempfile variables are also passed. These arguments are described in the Variables topic.

Script output
When a script completes execution, its output appears in the execution log.

Script length
Although, the maximal length of the script is 32,768 characters, you can use the "import" construction to load another Python script file. Such files do not have length limitations.

Returning codes
Error code: Error code of starting the command
Exit code: Exit code from the script

Related Articles
Python scripting in Advanced Task Scheduler

Categories: Manual, Shortcut type

Leave a Reply

About us   Cookie policy   Privacy policy   Terms of use   Link to us