
The second file path is the path to the Python script we want to run which in this case is buyer_behaviour_analysis.py.

(In my case, it is Python 2.7 as I have different versions installed)

To create a batch file, simply open a new Notepad andĮcho C:\Users\adaba\Anaconda3\envs\gl-env\python.exe C:\TREES\customer_segmentation_maoting\buyer_behaviour_analysis.py %* PAUSE.This will ensure that your script runs without breaking due to any different Python version.For instance, if you want your script to run with Python 2.7, you shebang line will be #! python2.7 First of all, if you want your script to run with a particular Python version you can decide that by declaring shebang line.

After writing your script, you might want to schedule it to run periodically, let’s say, Daily, Weekly or Any Time interval you will decideīefore you schedule that you want to simply create a batch file and schedule it run with a Windows Scheduler.
