I am writing because I am wondering if it is possible to run an ArcObjects .NET add-in as a Windows scheduled task.
I have written some code in VB.NET through ArcObjects and then I prepared the add-in using Visual Studio.
It works fine in ArcGIS desktop but now I need to run it automatically every night as a scheduled task.
I know that it is possible for Python scripts ... maybe wrapping the .NET add-in inside a Python script?
Andrea Lugli (Italy)
Solved! Go to Solution.
Technically yes...but it would make more sense to migrate your logic to a construct that would be easier to run headlessly, like a standalone console application (i.e. exe) or gp service. If you must run the logic as an addin then you'd need to write an additional application to automate driving a session of ArcMap so that you can get a hook into your addin content and interact with it as needed.
The following two pages would get you started.
Automating the ArcGIS Desktop Application
How to create an application to run on a schedule
http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//0001000002nt000000
If it's an exe, I would check out Schedule a task - Windows Help
Keep in mind some pitfalls others have encountered:
Technically yes...but it would make more sense to migrate your logic to a construct that would be easier to run headlessly, like a standalone console application (i.e. exe) or gp service. If you must run the logic as an addin then you'd need to write an additional application to automate driving a session of ArcMap so that you can get a hook into your addin content and interact with it as needed.
The following two pages would get you started.
Automating the ArcGIS Desktop Application
How to create an application to run on a schedule
http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//0001000002nt000000