<?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: arcpy.env.ScratchWorkspace is not using arcgisjobs dir in 11.3 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569608#M73373</link>
    <description>&lt;P&gt;Yes - that is correct.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Dec 2024 23:26:28 GMT</pubDate>
    <dc:creator>DonMorrison1</dc:creator>
    <dc:date>2024-12-17T23:26:28Z</dc:date>
    <item>
      <title>arcpy.env.ScratchWorkspace is not using arcgisjobs dir in 11.3</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1568954#M73345</link>
      <description>&lt;P&gt;Not getting anything from Geoprocessing board so trying here.&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;On server 11.3 Scratch Workspace is not giving back the job dir from arcgisjobs dir.&amp;nbsp; Instead it is giving and writing to AppData under the user name.&amp;nbsp; This dir is not part of the cleanup schedule and is growing over time.&lt;/P&gt;&lt;P&gt;arcpy.AddMessage("Scratch Workspace " + arcpy.env.scratchWorkspace)&lt;/P&gt;&lt;P&gt;Scratch Workspace C:\Users\serveruser~1\AppData\Local\Temp\aim\speedtest_gpserver\j9b2d66b7a00d4a8696d2fe7973da3ba4\scratch&lt;/P&gt;&lt;P&gt;The post here shows it should be my arcgisjobs dir right?&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/python-questions/geoprocessing-service-to-return-a-file/td-p/522062" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/python-questions/geoprocessing-service-to-return-a-file/td-p/522062&lt;/A&gt;&amp;nbsp; &amp;nbsp;I remember seeing this happen in the past I think.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DougBrowning_0-1734368367711.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/121837iC904C5179FB79FE9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DougBrowning_0-1734368367711.png" alt="DougBrowning_0-1734368367711.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am even seeing it create the jobs dir with a scratch folder in the arcgisjobs folder and even a scratch GDB but it does not use it.&amp;nbsp; I can find no way in script to find this jobs dir either?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DougBrowning_1-1734368367720.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/121836iB36225C0CD820994/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DougBrowning_1-1734368367720.png" alt="DougBrowning_1-1734368367720.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is it not using arcgisjobs as configured both in the GP tool and in the server settings?&amp;nbsp; Is this a bug of some sort?&amp;nbsp; I cannot figure out how I can even get the job dir in script if none of these work.&amp;nbsp; Scratch GDB is doing the same thing.&amp;nbsp;&amp;nbsp;Scratch Folder same deal it gives me the AppData dir and not the jobs dir.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 16:59:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1568954#M73345</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2024-12-16T16:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.env.ScratchWorkspace is not using arcgisjobs dir in 11.3</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569017#M73348</link>
      <description>&lt;P&gt;Have you verified that your project has the jobdir configured correctly? I believe that the AppData/Temp location is used as a fallback if the project does not have a specified scratch location.&lt;/P&gt;&lt;P&gt;You could try using the&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/envmanager.htm" target="_self"&gt;EnvManager&lt;/A&gt; context manager to force it to use a specific directory.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 19:28:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569017#M73348</guid>
      <dc:creator>HaydenWelch</dc:creator>
      <dc:date>2024-12-16T19:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.env.ScratchWorkspace is not using arcgisjobs dir in 11.3</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569083#M73356</link>
      <description>&lt;P&gt;Yes the jobs dir is set properly on each GP tool and in the server settings.&lt;/P&gt;&lt;P&gt;I could force a new root but I still would not know what the job number is.&amp;nbsp; I am still stuck with no way to get the actual path to the dir for each job at runtime.&amp;nbsp; I really think this was working before 11.3.&amp;nbsp; It is still creating the scratch dir and scratch.gdb in the jobs dir but never uses it.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 21:37:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569083#M73356</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2024-12-16T21:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.env.ScratchWorkspace is not using arcgisjobs dir in 11.3</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569151#M73357</link>
      <description>&lt;P&gt;When using UNC paths for ArcGIS Server working directories, the arcgisjobs folder defined for the service is the folder where job metadata, results, outputs, etc... go, it is not the folder where a geoprocessing task/job does its work.&amp;nbsp; When a task/job is running on a specific ArcGIS Server machine, there is a jobs folder created in the local temp folder that is used for processing data.&amp;nbsp; When processing is complete, any results and output are copied to the arcgisjobs folder defined for the service.&lt;/P&gt;&lt;P&gt;For a single-machine ArcGIS Server deployment where the working directories point to local drives, the arcgisjobs folder for the service may be where the geoprocessing task/job does its actual work.&amp;nbsp; (&lt;EM&gt;We don't deploy single-machine, so I can't say for sure)&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 23:50:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569151#M73357</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2024-12-16T23:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.env.ScratchWorkspace is not using arcgisjobs dir in 11.3</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569328#M73363</link>
      <description>&lt;P&gt;"When processing is complete, any results and output are copied to the arcgisjobs folder defined for the service."&lt;BR /&gt;Wouldn't this be the output folder though?&lt;/P&gt;&lt;P&gt;The problem with it using the local temp folder is this is not part of the cleanup routines.&amp;nbsp; It should use the scratch in the jobs folder, which then gets cleaned up on the regular.&amp;nbsp; At least that would make a lot more sense.&lt;/P&gt;&lt;P&gt;So do I have to have my scripts self clean now? (I worry trying to delete at the end of the script will cause locking issues.)&amp;nbsp; &amp;nbsp;Basically the server is for sure going to run out of space all the time now.&amp;nbsp; I really thought I remember it did not used to do this as I think I remember watching it create stuff in the jobs folder.&amp;nbsp; Plus we have never had this issue before.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 15:03:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569328#M73363</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2024-12-17T15:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.env.ScratchWorkspace is not using arcgisjobs dir in 11.3</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569343#M73366</link>
      <description>&lt;P&gt;I will agree that since 11.0 the local temp folder of the account running ArcGIS Server gets bloated much faster.&amp;nbsp; It isn't just jobs, we see it getting bloated with all kinds of files, and Esri does not seem to be cleaning it up.&amp;nbsp; We implemented a scheduled task on each ArcGIS Server machine that runs daily and deletes any file and folder older than X number of days in the local temp folder for the service account running ArcGIS Server.&amp;nbsp; Should we have to do it?&amp;nbsp; No, but it is trivial to implement and it addresses the issue, so I focus my time on bigger challenges with ArcGIS Server.&lt;/P&gt;&lt;P&gt;Regarding jobs working directories, having the process directly interact with the UNC path for its processing would have noticeable, possibly dramatic, performance impacts; and the risk of data corruption would increase.&amp;nbsp; Back in the ArcGIS Server 9.x days, Esri did try that approach, and they even had a "localJobsDirectory" setting where the service working directory could be pointed locally.&amp;nbsp; Eventually, they made the local job directory the standard to improve performance and lower data corruption risks.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 15:29:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569343#M73366</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2024-12-17T15:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.env.ScratchWorkspace is not using arcgisjobs dir in 11.3</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569467#M73369</link>
      <description>&lt;P&gt;I just check the logs of my geoprocessing tasks running on our 11.3 server and I'm not seeing the same thing.&amp;nbsp; My code uses the arcpy.env.scratchGDB setting and it appears to be putting things in the right place. Here is an example&lt;/P&gt;&lt;LI-CODE lang="python"&gt;2024-12-17 12:41:07,960 - Temporary feature class C:\arcgisserver\directories\arcgisjobs\row_as_habitat\analyzebeeoccurrence_gpserver\jd6c0f33269f649b8a0551b4440c939e5\scratch\scratch.gdb\row_buffered_centerlines_319048053&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I don't have access the server so I can't say for sure if the files are getting clean up, but I'm assuming so.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 18:49:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569467#M73369</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2024-12-17T18:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.env.ScratchWorkspace is not using arcgisjobs dir in 11.3</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569478#M73370</link>
      <description>&lt;P&gt;That is where I am seeing the server create the scratch GDB also.&amp;nbsp; But&amp;nbsp;arcpy.env.scratchGDB is returning a path to AppData so it never uses it.&lt;/P&gt;&lt;P&gt;This got cut off above I think.&amp;nbsp; He is what I get from a test GP tool.&amp;nbsp; Server is 11.3.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;AddMessage&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Scratch&amp;nbsp;Workspace&amp;nbsp;"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;env&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;scrat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ddMessage&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Package&amp;nbsp;Workspace&amp;nbsp;"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;env&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;packageWorkspace&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;AddMessage&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"Script&amp;nbsp;Workspace&amp;nbsp;"&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;env&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;scriptWorkspace&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Scratch Workspace C:\Users\userreaplace~1\AppData\Local\Temp\aim\speedtest_gpserver\jef84e091d73b42078280de5458f66360\scratch&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Scratch Folder C:\Users\userreaplace~1\AppData\Local\Temp\aim\speedtest_gpserver\jef84e091d73b42078280de5458f66360\scratch&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Scratch GDB C:\Users\userreaplace~1\AppData\Local\Temp\aim\speedtest_gpserver\jef84e091d73b42078280de5458f66360\scratch\scratch.gdb&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Package Workspace \\loc\ServerDev\directories\arcgissystem\arcgisinput\folder\SpeedTest.GPServer\extracted\p30&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Script Workspace \\loc\ServerDev\directories\arcgissystem\arcgisinput\folder\SpeedTest.GPServer\extracted\p30&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 19:16:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569478#M73370</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2024-12-17T19:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.env.ScratchWorkspace is not using arcgisjobs dir in 11.3</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569596#M73371</link>
      <description>&lt;P&gt;Don, your ArcGIS Server site must be a single-machine site because multi-machine sites have to use network shares for the various ArcGIS Server directories.&amp;nbsp; The behavior of geoprocessing services varies between local and network share folders.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 22:15:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569596#M73371</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2024-12-17T22:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.env.ScratchWorkspace is not using arcgisjobs dir in 11.3</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569608#M73373</link>
      <description>&lt;P&gt;Yes - that is correct.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2024 23:26:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-env-scratchworkspace-is-not-using-arcgisjobs/m-p/1569608#M73373</guid>
      <dc:creator>DonMorrison1</dc:creator>
      <dc:date>2024-12-17T23:26:28Z</dc:date>
    </item>
  </channel>
</rss>

