Adding Python scripts to batch files

Scheduling your Python scripts to run at prescribed times will require that you create a batch file containing one or more scripts and or operating system commands. These batch files can then be added to the Windows scheduler to run at a specific time interval.

Getting ready

Batch files are text files containing command-line sequences to run Python scripts or perform operating system commands. They have a file extension of .bat, which Windows recognizes as an executable file. Since batch files simply contain command-line sequences, they can be written with any text editor, though it is recommended that you use a basic text editor, such as Notepad. This is done so that you can avoid the inclusion of invisible ...

Get Programming ArcGIS with Python Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.