Scheduling a Python script to run at prescribed times

How to schedule a Python script to run at prescribed times

The method to schedule a Python script depends on your operating system. The general steps for Windows operating systems are given below. For more information about scheduled tasks, see the Windows help. For Unix and Linux systems, see the man entry for cron or crontab.

For more information on running a script or model at a prescribed time, see the blog post Scheduling a Python script or model to run at a prescribed time

Scheduled Tasks

Steps:
  1. Open the Task Scheduler wizard.
    • For Windows 7
      1. Click the Windows Start menu, click Control Panel > Administrative Tools and click Task Scheduler.
        NoteNote:

        If Control Panel is in category view, click System and Security, click Administrative Tools, then click Task Scheduler.

    • For Windows Vista
      1. Click the Windows Start menu, click Settings, point to Control Panel, then click System and Maintenance. Click Administrative Tools and click Schedule tasks.
    • For Windows XP
      1. Click the Windows Start menu, point to Control Panel, then double-click Scheduled Tasks.
      2. If the control panel is in category view, click Performance and Maintenance and click Scheduled Tasks.
    • For Windows 2000 and NT
      1. Click the Windows Start menu, point to Settings, point to Control Panel, then click Scheduled Tasks.
  2. Double-click Add Scheduled Task (or Create Basic Task).
  3. Complete the options on the wizard. These options include when you want the scheduled task to run, the path to the script you want to run, and any arguments to the script.
3/3/2014