Select to view content in your preferred language

Using Export Tile Cache in scheduled job has rights issues

4804
2
03-23-2015 11:37 AM
DougBrowning
MVP Esteemed Contributor

I am running this command in a python script

arcpy.ExportTileCache_management(unzipedTPK, pathTPK, justfilenameTPK, "TILE_PACKAGE", "#", "#", boundryFile)

It works fine if I run it in PyScripter.  It also runs fine if I run it from a batch file. 

But if I schedule that batch file with Task Scheduler it dies with this error.

ExecuteError: ERROR 001132: Failed to export cache

ERROR 001485: Failed to create tile package : \\hnrgad\vancouver\GISFiles\Projects\MobileMap Data\CurrentBuilds\BC\TPK\BCSettings.tpk

Failed to execute (ExportTileCache).

I found old bugs that it does not pick of the user correctly but nothing that is recent.  It seems to die on trying to create a subdir.  It will create the main names dir and conf.cdi, conf.properties, and conf.xml but not anything else.  The task seems fine and has rights in every other part of the script (runs Create Tile Package to same location fine).

The user is in the Admin group.

Any ideas?

10.3, Windows 7 Enterprise

Thanks

0 Kudos
2 Replies
DougBrowning
MVP Esteemed Contributor

I have now found that it will work if the scheduled job option is set to "Run only when user is logged in".  But this of course does not help me much.  There is some security option deep in there that is wrong.

0 Kudos
DougBrowning
MVP Esteemed Contributor

Also tried Psexec with no luck.

For now I have to leave the user logged in and just pray that no one logs it off or a reboot does not happen.  (It runs over the weekend so I can not babysit it.)

0 Kudos