<?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 32 &amp;amp; 64 bit automation in scheduled task in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111449#M8662</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a specific reason you are mixing 32-bit and 64-bit geoprocessing environments?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Apr 2013 14:23:13 GMT</pubDate>
    <dc:creator>MathewCoyle</dc:creator>
    <dc:date>2013-04-18T14:23:13Z</dc:date>
    <item>
      <title>Python 32 &amp;amp; 64 bit automation in scheduled task</title>
      <link>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111448#M8661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a process that runs the 64-bit version of python as well as the 32-bit version.&amp;nbsp; The processes run on a machine with both ArcGIS Server and ArcGIS Desktop installed.&amp;nbsp; The 64-bit processes stop/start map services on the server while the 32-bit process does some database joins, db analyze, deletion, copying, and compressing.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need this process to be automated and would like them to run under a single scheduled task on Windows Server 2008.&amp;nbsp; I have ran the pythons scripts successfully individually as well as combining the processes into a single python script.&amp;nbsp; The scripts work when run from Python IDLE, the command line, as well as from batch (.bat) files.&amp;nbsp; However, they only way they will run in scheduled tasks is if they are each in a separate scheduled tasks.&amp;nbsp; I tried to created a separate batch file for each process and then call all three batch files from another batch file, didn't work.&amp;nbsp; I tried 1 batch file that calls each version of python individually with each script, didn't work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't call python within the scheduled task with the .py script as the argument because I need to call Python's two versions: C:\Python27\ArcGISx6410.1\python.exe &amp;amp; C:\Python27\ArcGIS10.1\python.exe.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following batch file executes the first script but will not execute the second or third scripts:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;ECHO ON

C:\PYTHON27\ArcGISx6410.1\python.exe D:\GIS\Automation_Files\PythonScripts\StopServices.py

C:\PYTHON27\ArcGIS10.1\python.exe D:\GIS\Automation_Files\PythonScripts\ParcelJoin.py


C:\PYTHON27\ArcGISx6410.1\python.exe D:\GIS\Automation_Files\PythonScripts\StopServices.py 

pause
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 14:15:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111448#M8661</guid>
      <dc:creator>TristanKnowlton</dc:creator>
      <dc:date>2013-04-18T14:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Python 32 &amp; 64 bit automation in scheduled task</title>
      <link>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111449#M8662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a specific reason you are mixing 32-bit and 64-bit geoprocessing environments?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 14:23:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111449#M8662</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-04-18T14:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Python 32 &amp; 64 bit automation in scheduled task</title>
      <link>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111450#M8663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In order to do the geoprocessing I need to break the locks on the data that my ArcGISServer account places on the data.&amp;nbsp; To do this, I need to stop the map services that contain the data that I am working on.&amp;nbsp; I believe the 64-bit version of python is needed to run those since Server is 64 bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 14:35:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111450#M8663</guid>
      <dc:creator>TristanKnowlton</dc:creator>
      <dc:date>2013-04-18T14:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Python 32 &amp; 64 bit automation in scheduled task</title>
      <link>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111451#M8664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can upgrade ArcGIS for Desktop to use 64-bit geoprocessing as well.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 15:22:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111451#M8664</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-04-18T15:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Python 32 &amp; 64 bit automation in scheduled task</title>
      <link>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111452#M8665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Mathew.&amp;nbsp; I looked into it and see that it will not work with OLEDB connections.&amp;nbsp; One of my data sets includes a connection via OLEDB.&amp;nbsp; Looks like that kills that option.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 17:20:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111452#M8665</guid>
      <dc:creator>TristanKnowlton</dc:creator>
      <dc:date>2013-04-18T17:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Python 32 &amp; 64 bit automation in scheduled task</title>
      <link>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111453#M8666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Actually after thinking about that for a bit, I could do the geoprocessing involving the OLEDB connection on another machine at another time since it is not a critical piece of the puzzle anyway.&amp;nbsp; I'll upgrade to 64-bit processing on my server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 17:26:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111453#M8666</guid>
      <dc:creator>TristanKnowlton</dc:creator>
      <dc:date>2013-04-18T17:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Python 32 &amp; 64 bit automation in scheduled task</title>
      <link>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111454#M8667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Or you could do all the processing in 32bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You dont have to use 64 bit Python to stop / start services. Well I can't imagine any particular code that would be 64bit dependent. Yes, Server is 64bit, but if you're making REST-Admin calls with URLLIB or something similar, the bits dont matter, its just HTTP calls.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 22:37:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111454#M8667</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2013-04-18T22:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Python 32 &amp;amp; 64 bit automation in scheduled task</title>
      <link>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111455#M8668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This post is seven years old, hopefully you found a solution. If not, or for those with same problem, see this Esri KB article below. Basically you need to add Call in your batch file for each line. The KB article linked below has the details on why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://support.esri.com/en/technical-article/000015230" title="https://support.esri.com/en/technical-article/000015230"&gt;Problem: Batch files exit after the first Python command&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2020 02:04:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-32-amp-amp-64-bit-automation-in-scheduled/m-p/111455#M8668</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-05-22T02:04:41Z</dc:date>
    </item>
  </channel>
</rss>

