We have our python script ready to be scheduled nightly to refresh our legacy parcels feature class from the fabric. Preparing the script to be run from windows task scheduler I created a simple .bat file that calls the python exe and passes the script.
"C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe" "\\path to script\script.py
This morning I ran the script by double clicking the .bat file. The messages appeared in the command window leading me to believe that the log file would be updated.
The .py script uses logging library:
logging.basicConfig(filename='parcelsync.log', level=logging.DEBUG)
# Start Time
print ("\nStart Time: {}".format(StartTime))
logging.info("\nStart Time: {}".format(StartTime))
After the script completed I noticed that the log file hadn't been updated but the script did update the features.
What am I missing?
I tried searching the web for an explanation and I can't come close to finding a relevant result 🙂
As always, help is greatly appreciated.