<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python Script Task Scheduler Alternative in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351970#M27602</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the service account running the batch file doesn't have permissions to execute Python, will this method still work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Dec 2018 15:26:05 GMT</pubDate>
    <dc:creator>EricaPfister</dc:creator>
    <dc:date>2018-12-18T15:26:05Z</dc:date>
    <item>
      <title>Python Script Task Scheduler Alternative</title>
      <link>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351962#M27594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a python script that I would like execute on an interval of every 5 minutes to check a SDE field for a new record.&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Our Enterprise Systems team does not allow Windows Task Scheduler to execute Python. Does anyone know an alternative way to have the script executed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently running ArcGIS 10.5.1 on Windows and SQL Server 2014.&lt;/P&gt;&lt;P&gt;Here is what the script does:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Connect to SDE&lt;/LI&gt;&lt;LI&gt;Start the arcpy.da.Editor session&lt;/LI&gt;&lt;LI&gt;Open a arcpy.da.UpdateCursor session&lt;/LI&gt;&lt;LI&gt;Look for null values and if there is a null, update it a string value&lt;/LI&gt;&lt;LI&gt;Close the arcpy.da.Editor sesion&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script needs to be run on a server and we are not allowed to use Service Accounts with passwords. We only have Group Managed Service Accounts (gMSA) with no passwords and those are not allowed to execute the python exe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2018 17:34:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351962#M27594</guid>
      <dc:creator>deleted-user-RAnIQZ9vH9z7</dc:creator>
      <dc:date>2018-12-17T17:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script Task Scheduler Alternative</title>
      <link>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351963#M27595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you not allowed to run any python script thru Windows Task Scheduler or just scripts that would edit the SDE database?&amp;nbsp; This is not as efficient a process, but you could write the data out to a file geodatabase to check for Nulls and then have an SDE editor perform the edits that are needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2018 17:44:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351963#M27595</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2018-12-17T17:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script Task Scheduler Alternative</title>
      <link>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351964#M27596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #3d3d3d; font-family: arial,helvetica,'helvetica neue',verdana,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Not allowed to run any python script through Windows Task Scheduler.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2018 17:47:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351964#M27596</guid>
      <dc:creator>deleted-user-RAnIQZ9vH9z7</dc:creator>
      <dc:date>2018-12-17T17:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script Task Scheduler Alternative</title>
      <link>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351965#M27597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are any number of bad ways to make this happen, but the best option is to have an awkward conversation with your Enterprise Systems team explaining why you need to run Python through task scheduler, or provide their own workaround that will work in your system.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2018 18:29:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351965#M27597</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2018-12-17T18:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script Task Scheduler Alternative</title>
      <link>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351966#M27598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well if the team blocks .py file types from running just create a .bat that points to the .py... tasks scheduler runs the batch file, which in returns runs the python file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2018 18:43:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351966#M27598</guid>
      <dc:creator>Lake_Worth_BeachAdmin</dc:creator>
      <dc:date>2018-12-17T18:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script Task Scheduler Alternative</title>
      <link>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351967#M27599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since this is an enterprise geodatabase, I would look into having DBAs create a database trigger to address your NULL to value conversion rather than having ArcPy connect every five minutes, especially in this case since your IT department seems to be making it very difficult for you to run a script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2018 19:41:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351967#M27599</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-12-17T19:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script Task Scheduler Alternative</title>
      <link>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351968#M27600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're having to go that kind of route. Seems SQL Server Manager can invoke a Job at certain time intervals using the SQL Server Agent. Not sure about SQL Server 2014 though, still researching that. I've asked multiple SQL gurus about addressing the NULL to value conversion and every time I mention that the NULL value needs to be a string, they have no answer.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2018 19:53:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351968#M27600</guid>
      <dc:creator>deleted-user-RAnIQZ9vH9z7</dc:creator>
      <dc:date>2018-12-17T19:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script Task Scheduler Alternative</title>
      <link>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351969#M27601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A quick Google search on "sql server trigger convert null to value" returns several suggestions on how to structure a trigger to do what you want.&amp;nbsp; In this case, the twist would be that you want it against a view (the versioned view corresponding to the feature class) instead of the base table itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2018 20:27:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351969#M27601</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-12-17T20:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script Task Scheduler Alternative</title>
      <link>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351970#M27602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the service account running the batch file doesn't have permissions to execute Python, will this method still work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2018 15:26:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351970#M27602</guid>
      <dc:creator>EricaPfister</dc:creator>
      <dc:date>2018-12-18T15:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script Task Scheduler Alternative</title>
      <link>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351971#M27603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Found the work around. The original &lt;A href="https://www.esri.com/arcgis-blog/products/product/analytics/scheduling-a-python-script-or-model-to-run-at-a-prescribed-time/?rmedium=redirect&amp;amp;rsource=blogs.esri.com%2Fesri%2Farcgis%2F2013%2F07%2F30%2Fscheduling-a-scrip"&gt;ArcGIS blog post&lt;/A&gt; says to run the Python exe and in the argument, put the location of the .py file. The Enterprise Systems team says no exe files are allowed to run under the Service Account (gMSA). I rewrote my script to execute as a standalone file. Meaning if python is installed on your machine and you double click the .py file, the script should run without calling an exe. This is Vanilla Python and nicely explained by this &lt;A href="https://www.youtube.com/watch?v=sugvnHA7ElY&amp;amp;vl=en"&gt;video. &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With my .py file ready to roll, I scheduled a task on the server to call the .py file and not exe. In the Triggers tab, I was able to schedule a Daily task to run at a specific time. My original requirement was every 5 minutes. The Advanced Settings for the Daily task does not work. The work around I have is set a new trigger every 2 hours instead of every 5 minutes and have the customer accept the solution that the Enterprise Systems team has allowed us to work with. Even that, I will have to schedule 12 separate triggers for the 1 task scheduler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Either case, thanks for all your comments and suggestions!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2018 16:05:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-task-scheduler-alternative/m-p/351971#M27603</guid>
      <dc:creator>deleted-user-RAnIQZ9vH9z7</dc:creator>
      <dc:date>2018-12-18T16:05:07Z</dc:date>
    </item>
  </channel>
</rss>

