<?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: Preventing ModelBuilder model from working on/after particular date? in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/preventing-modelbuilder-model-from-working-on/m-p/811799#M1636</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to make a model but I do not succeed. Below is the snapshot. Please help .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/422405_Model.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Sep 2018 10:51:23 GMT</pubDate>
    <dc:creator>PradipSwain</dc:creator>
    <dc:date>2018-09-19T10:51:23Z</dc:date>
    <item>
      <title>Preventing ModelBuilder model from working on/after particular date?</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/preventing-modelbuilder-model-from-working-on/m-p/811796#M1633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;I am working in ModelBuilder in ArcGIS Desktop.&lt;/P&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;I have a project of road network with administrative Boundary. In this project, I have created some models through ModelBuilder. I want to stop models from working after the project over.&lt;/P&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;Is there any script to stop models from working a particular date/time?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2018 11:01:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/preventing-modelbuilder-model-from-working-on/m-p/811796#M1633</guid>
      <dc:creator>PradipSwain</dc:creator>
      <dc:date>2018-06-20T11:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Preventing ModelBuilder model from working on/after particular date?</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/preventing-modelbuilder-model-from-working-on/m-p/811797#M1634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have never done this in a model but to get you started perhaps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create a starting custom script in the model that runs at the beginning&lt;/P&gt;&lt;P&gt;&amp;nbsp;2. That script checks the system data or some other stored date ie project date from your dataset?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Compare dates if current date later than checked date then stop model....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some help references to get you started:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/tools/modelbuilder-toolbox/stop.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/tools/modelbuilder-toolbox/stop.htm"&gt;Stop—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://knowledge.safe.com/articles/1190/using-a-python-startupshutdown-script-to-perform-g.html" title="https://knowledge.safe.com/articles/1190/using-a-python-startupshutdown-script-to-perform-g.html"&gt;Using a Python Startup/Shutdown Script or PythonCaller to Perform Geoprocessing with Arcpy - FME Knowledge Center&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2018 14:54:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/preventing-modelbuilder-model-from-working-on/m-p/811797#M1634</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2018-06-20T14:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Preventing ModelBuilder model from working on/after particular date?</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/preventing-modelbuilder-model-from-working-on/m-p/811798#M1635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you are already using a Model I would just create a Python script 'model' to add to the end that does the date check and returns a boolean. In your model check the return value, if&amp;nbsp;true End, otherwise loop to the beginning of your model (or reschedule the model to execute at future time).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script would be along the lines of:&lt;A href="https://community.esri.com/t5/tag/python./tg-p"&gt;#python.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;____&lt;/P&gt;&lt;P&gt;import sys&lt;/P&gt;&lt;P&gt;import datetime&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE class=""&gt;now &lt;SPAN style="color: #66cc66;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #dc143c;"&gt;datetime&lt;/SPAN&gt;.&lt;SPAN style="color: #dc143c;"&gt;datetime&lt;/SPAN&gt;.&lt;SPAN style="color: black;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;theCurrentDate =&amp;nbsp; now.strftime('%y/%m/%d')&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;//** example of string format to send in =&amp;nbsp; '2018/06/30'&amp;nbsp; &amp;nbsp; **//&lt;/P&gt;&lt;P&gt;theEndDate = datetime.strftime(sys.argv[1],&amp;nbsp;&lt;SPAN&gt;'%y/%m/%d')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if theCurrentDate &amp;gt; theEndDate:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return true&lt;/P&gt;&lt;P&gt;return false&lt;/P&gt;&lt;P&gt;___________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 17:06:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/preventing-modelbuilder-model-from-working-on/m-p/811798#M1635</guid>
      <dc:creator>RichardDaniels</dc:creator>
      <dc:date>2018-06-26T17:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Preventing ModelBuilder model from working on/after particular date?</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/preventing-modelbuilder-model-from-working-on/m-p/811799#M1636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to make a model but I do not succeed. Below is the snapshot. Please help .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/422405_Model.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2018 10:51:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/preventing-modelbuilder-model-from-working-on/m-p/811799#M1636</guid>
      <dc:creator>PradipSwain</dc:creator>
      <dc:date>2018-09-19T10:51:23Z</dc:date>
    </item>
  </channel>
</rss>

