Southsoftware.com
.:Pricing
Home
Products
Downloads
Support
Contacts
Site Map
.:Advanced Task Scheduler
About product
Download trial
Purchase license
Compare editions
View screenshot
FAQ & Support
Press Kit
.:Articles
Online manual
Blog posts
Videos
More articles...
.:Follow us
Follow us on Facebook Follow us on Twitter Follow us on YouTube
   

Python scripting in Advanced Task Scheduler

Internal and standard Python interpreter
Advanced Task Scheduler comes with internal portable Python interpreter. You only need to install Advanced Task Scheduler, create a Python script task and use all Python scripting power.

Python Task
Python Execution Log

Getting Python version
The script below displays current Python version to the task execution log:

import platform
print platform.python_version()

Current task’s arguments
The script below displays the advscheduler dictionary to the task execution log:

for key, value in advscheduler.iteritems() :
  print key, value

Load code from external files
The script below runs Python code from the filename.py file:

import filename.py

For portable Python the filename.py file must be located in the current directory or in a directory listed in the Additional library path option in the Scripts section of the Preferences window. For installed Python the filename.py file must be located in the current directory or in a directory listed in the PYTHONPATH environment variable.

Commander features
Python script can call some Advanced Task Scheduler features via the Command line tool. The example below demonstrates how to send an e-mail message to a GMail address:

from subprocess import call
call([commander,
"--SendEMail",
"-email",
"username@gmail.com",
"-server",
"smtp.gmail.com:587",
"-auth",
"username@gmail.com",
"password",
"-starttls",
"-sender",
"sender@mail.com",
"-subject",
"Subject",
"-msg",
"Text"]);

Where commander is file name and path to the Command line tool: advscheduler_commander.exe, advscheduler_procmd.exe (Professional Edition) or advscheduler_netcmd.exe (Network Edition). Command line described in the Command line tool topic.

Categories: Shortcut type, Task scheduler

Leave a Reply

   
About us   Privacy policy   Terms of use   Link to us
Current Version: 4.5.0.616
The following prices are based on a single order:
Basic Edition 32 and 64-bit$ 39.95 USD
Professional Edition 32 and 64-bit$ 59.95 USD
Network Edition 32 and 64-bit$ 149.95 USD
.:Testimonials

I use Advanced Task Scheduler to run my backups jobs. After performing a backup by standard Windows 2003 Server means, Advanced Task Scheduler launches a script which copies files. I am glad I chose your program.

Rob Hannigan

.:Requirements
Computer: Minimum required by operating system you are running.
Disk Space: Under 30 MB
Operating System: Microsoft Windows 32-bit or 64-bit.
Read more...