Python script

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

Python can be executed in two ways in Advanced Task Scheduler:

  • Internal portable Python: you do not need to install and configure Python to run Python scripts from Advanced Task Scheduler.
  • Installed Python: binary Python installation is required.

Portable Python
When the option Use internal Python interpreter in the Scripts section of the Preferences window is selected, internal portable Python interpreter is used to run Python scripts. Portable Python in Advanced Task Scheduler is built from original sources and packed into a single executable (advscheduler_python.exe). It includes all standard modules, excluding Tkinter and Distutils modules. For more information how to add modules, please see the Additional libraries section.

Installed Python
When the option Use internal Python interpreter in the Scripts section of the Preferences window is not selected, Advanced Task Scheduler searches for Python executable (python.exe) in the directories listed in the PATH environment variable. 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: actionschedule, actiontime, actionsource, actionsourceextra, lasterrorcode, lastexitcode. Professional and Network Editions: all defined tempfile variables are also passed. These arguments are described in the Launch application topic.

Additional libraries
This portable Python can load modules in binary form from a directory listed in the Additional library path option in the Scripts section of the Preferences window. If you need a specific module and you are a registered user, please let us know and we'll add that module to this portable Python.

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