How to set up a Python program in Windows system timed run

Source: Internet
Author: User

Article Source: http://blog.csdn.net/wwy11/article/details/51100432

First of all, we must be using the "Scheduled Tasks" feature under Windows

Then click "Create Basic Task" on the right, enter the task name and an optional task description:

Click Next, set the start time of the task, this should be no difficulty, I set here to run this scheduled Task 10 O ' Day in the morning

Click Next, set the "action" to "Start the program", then click Next, the most important place to come, how to fill in this way to ensure that the system correctly run the Python program?

Don't say much nonsense, first look at the specific settings:

Here to explain the meaning of the contents of the three text box, the "program or script" text box is filled with the Python compiler name, generally is Python.exe, "Start in" text box is filled with the Python compiler directory, assume that your Python compiler's full path is "C: \ Python27\python.exe, the Add parameter text box is filled with the full path of your Python program, assuming there is a file called code.py under the Users folder of the C drive. If your Python program contains command-line arguments, add it to the full path of the Python program.

Believe that the smart reader has found that if the three parts are linked together, is "C:\Python27\python.exe C:\Users\code.py", which is actually in the Windows command line under the input "Python C:\Users\code.py "(or" Python code.py ", if you happen to be in the C:\Users directory), just give the full Python compiler a path in the setup of the scheduled task.

Then click Next to finish, is it simple?

How to set up a Python program in Windows system timed run

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.