<?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: Automating Create Job tool in ArcGIS Workflow Manager Questions</title>
    <link>https://community.esri.com/t5/arcgis-workflow-manager-questions/automating-create-job-tool/m-p/634480#M1272</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Courtney,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for such a late reply.&amp;nbsp; I don't have a 10.1 machine readily available, but I downloaded the latest version of the tools, installed them as-is to 10.2.1, and ran a test like what I believe you're describing.&amp;nbsp; In both a cmd prompt and as a scheduled task, the script ran and created a job.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My database was SQL Express, and I was using the Workflow Manager quick start configuration available through the post-install.&amp;nbsp; The "main()" function of my script was as follows (I essentially just swapped the code below with the main() function in the "UploadAndBackupSample1.py" from the tools' Documentation folder):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def main():
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get any necessary licenses before importing the toolbox
&amp;nbsp;&amp;nbsp;&amp;nbsp; checkOutLicenses("", ["JTX"])

&amp;nbsp;&amp;nbsp;&amp;nbsp; # Import the Workflow Manager toolbox
&amp;nbsp;&amp;nbsp;&amp;nbsp; wmxToolbox = getWorkflowManagerToolboxLocation()
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ImportToolbox(wmxToolbox, "WMXAdminUtils")

&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CreateJob_WMXAdminUtils(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Data Edits",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "myWindowsUsername")
&amp;nbsp;&amp;nbsp;&amp;nbsp; logPreviousToolMessages()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some things to check would be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Download the latest version of the tools if you haven't already; I *think* they should build against 10.1 as-is.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;The permissions of the scheduled task user: make sure this user has an entry in the Workflow Manager database and is a member of a group with permissions to create new jobs.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Ensure that the default Workflow Manager database is set for the scheduled task user.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;(Kind of a long shot) Try launching ArcCatalog as the scheduled task user and ensure that the "Workflow Manager" extension is enabled.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;SPAN&gt;Anyway, if you're still having this issue, I hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Brian D.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 02:59:33 GMT</pubDate>
    <dc:creator>BrianDemers</dc:creator>
    <dc:date>2021-12-12T02:59:33Z</dc:date>
    <item>
      <title>Automating Create Job tool</title>
      <link>https://community.esri.com/t5/arcgis-workflow-manager-questions/automating-create-job-tool/m-p/634479#M1271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi -&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've written a script that automates the Create Job tool from the Workflow Manager Administration Utilities toolbox (downloadable from ArcGIS Resources: &lt;/SPAN&gt;&lt;A href="http://www.arcgis.com/home/item.html?id=387ce7914cde4744b549b934959a0b5f"&gt;http://www.arcgis.com/home/item.html?id=387ce7914cde4744b549b934959a0b5f&lt;/A&gt;&lt;SPAN&gt;).&amp;nbsp; It simply imports the toolbox, and sends parameters to the CreateJob tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This script is started from Windows Task Scheduler, and works in 10.0.&amp;nbsp; The toolbox is not available in 10.1 version, however, we have recompiled it against the 10.1 library and the tools (when run in ArcCatalog) work fine.&amp;nbsp; The script also works when running within ArcCatalog.&amp;nbsp; However, running the script through the task scheduler (or command prompt), I receive:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR: Failed to execute. Parameters are not valid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000584: Implementation of this Tool's Validate is invalid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone else successfully leveraged the Create Job tool with a python script and task scheduler in 10.1?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Dec 2013 19:44:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workflow-manager-questions/automating-create-job-tool/m-p/634479#M1271</guid>
      <dc:creator>CourtneyMoore</dc:creator>
      <dc:date>2013-12-17T19:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Automating Create Job tool</title>
      <link>https://community.esri.com/t5/arcgis-workflow-manager-questions/automating-create-job-tool/m-p/634480#M1272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Courtney,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for such a late reply.&amp;nbsp; I don't have a 10.1 machine readily available, but I downloaded the latest version of the tools, installed them as-is to 10.2.1, and ran a test like what I believe you're describing.&amp;nbsp; In both a cmd prompt and as a scheduled task, the script ran and created a job.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My database was SQL Express, and I was using the Workflow Manager quick start configuration available through the post-install.&amp;nbsp; The "main()" function of my script was as follows (I essentially just swapped the code below with the main() function in the "UploadAndBackupSample1.py" from the tools' Documentation folder):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def main():
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get any necessary licenses before importing the toolbox
&amp;nbsp;&amp;nbsp;&amp;nbsp; checkOutLicenses("", ["JTX"])

&amp;nbsp;&amp;nbsp;&amp;nbsp; # Import the Workflow Manager toolbox
&amp;nbsp;&amp;nbsp;&amp;nbsp; wmxToolbox = getWorkflowManagerToolboxLocation()
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ImportToolbox(wmxToolbox, "WMXAdminUtils")

&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CreateJob_WMXAdminUtils(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Data Edits",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "myWindowsUsername")
&amp;nbsp;&amp;nbsp;&amp;nbsp; logPreviousToolMessages()&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some things to check would be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Download the latest version of the tools if you haven't already; I *think* they should build against 10.1 as-is.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;The permissions of the scheduled task user: make sure this user has an entry in the Workflow Manager database and is a member of a group with permissions to create new jobs.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Ensure that the default Workflow Manager database is set for the scheduled task user.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;(Kind of a long shot) Try launching ArcCatalog as the scheduled task user and ensure that the "Workflow Manager" extension is enabled.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;SPAN&gt;Anyway, if you're still having this issue, I hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Brian D.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:59:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-workflow-manager-questions/automating-create-job-tool/m-p/634480#M1272</guid>
      <dc:creator>BrianDemers</dc:creator>
      <dc:date>2021-12-12T02:59:33Z</dc:date>
    </item>
  </channel>
</rss>

