← Back to Blog

Model it, script it, or schedule it? In ArcGIS Pro, scheduling runs a tool you already have — and the unattended run has rules of its own

Two cards on the left, one with a workflow diagram icon and one with a code file icon, each send a connector into a single tool card in the middle. The tool card is marked with a wrench, and its rows carry a sliders icon, a drive icon and a key icon. One connector runs on from that tool to a calendar card on the right listing four time-stamped runs, each with a check mark.

An ArcGIS Blog post from September 29, 2026, Automate what repeats and nothing else in ArcGIS Pro, walks through ModelBuilder and Python and adds that “Models can also be scheduled to run at a specific time or recurring interval.” It is easy to read that as three choices: model it, script it, or schedule it. It is not. Scheduling is how you run a tool you already have. The real job is two decisions, in order: where the logic lives, and how it runs when nobody is watching. The second one has documented rules that decide whether the first unattended run succeeds.

Everything below was checked against the ArcGIS Pro 3.7 documentation and the other pages listed under References. The two Python scripts below were run on ArcGIS Pro 3.7.1 through propy, the program the docs name for running a Python script as a scheduled task.

Schedule is an option on a tool, not a way to build one

Pro’s help is blunt: “Every geoprocessing tool can be scheduled.” You open the tool, fill in its parameters, then “Click the Run button split menu and choose Schedule.” Pro then hands the run to Windows Task Scheduler.

A ModelBuilder model is saved as a tool in a toolbox, and “As with any geoprocessing tool, you can open and run a model tool in the Geoprocessing pane.” So a model does not have to be exported, or wrapped in a script tool, before you can schedule it. A script tool is a geoprocessing tool too, and schedules the same way. A stand-alone .py file is not a tool, so you cannot open it and choose Schedule: you either wrap it in a script tool, as our weekly CSV mirror post did, or register it with Task Scheduler yourself, which we cover below.

First decision: model it or script it

Pick on what the logic needs, because the move between the two is not free. ModelBuilder gives you iterators, logical tools and a visual diagram of the workflow. It also has a hard edge: “Only one iterator can be used per model,” and once you add one, “all tools in the model iterate for each value in the iterator” unless you nest the looping part in a submodel.

The blog’s escape hatch is that “you can export the model to Python window or a Python script and continue developing the generated code.” True, with a catch the export page states plainly:

“Model tools Iterators, Utilities, or Logical will not be exported to Python. You will need to add equivalent Python functionality that these tools provide.” Layers or table views the model did not create itself are not recreated either; you add them in the script with tools such as Make Feature Layer.

So a model that leans on an iterator or a branch is rewritten, not exported, when it outgrows ModelBuilder. Here is what that rewrite looks like for an Iterate Feature Classes iterator, an inline %Name% output name and a row-count branch:

"""S2 - what you write by hand after Export To Python File, because the docs say
'Model tools Iterators, Utilities, or Logical will not be exported to Python.'
Replaces an Iterate Feature Classes (Feature Type=Point) iterator + inline %Name% output name
+ an If Row Count Is style branch, using arcpy.ListFeatureClasses and plain if/else."""
import os, sys, arcpy
GDB = os.path.join(os.path.dirname(os.path.abspath(__file__)), "scratch.gdb")
if not arcpy.Exists(GDB):
    sys.exit(f"workspace missing: {GDB}")
arcpy.env.overwriteOutput = True
with arcpy.EnvManager(workspace=GDB):
    fcs = arcpy.ListFeatureClasses("sites*", "Point")                  # Iterate Feature Classes
    if not fcs:
        sys.exit("no matching Point feature classes")
    for name in fcs:
        n = int(arcpy.management.GetCount(name)[0])
        if n > 0:                                                       # logical tool -> if/else
            out = f"{name}_buf"                                         # %Name%_buf
            arcpy.analysis.Buffer(name, out, "50 Meters")
            print("buffered", name, "->", out, n)
        else:
            print("skipped empty", name)

Run on Pro 3.7.1 through propy, against the scratch file geodatabase that the S1 job below also reads:

buffered sites -> sites_buf 3
EXITCODE=0

The two sys.exit guards are ours, not part of any export. Run before that geodatabase existed, the script stopped with exit code 1 and a message naming the missing workspace, so a run with nothing to do cannot pass for a successful one.

Our rule of thumb, not Esri’s: if the job is a fixed chain of tools that someone who does not write Python has to maintain, keep it a model. If it already needs loops, branches, its own logging or version control, start in Python. If you go to code, our Python toolbox post shows how we ship it into every project.

Second decision: how it runs unattended

AspectPro’s Schedule windowYour own Task Scheduler task
What runsAny geoprocessing tool, model tools and script tools includedA stand-alone script, launched with propy
InputsThe parameter values you set when you scheduled itWhatever your script reads
Run recordThe History pane’s Scheduled Tools sectionYour own log file and exit code

What Pro’s scheduled run does differently

The run happens outside your Pro session, and four rules follow.

Registering a script yourself

For a script you keep in version control, the Python in ArcGIS Pro page gives the program to use: “If you are running a Python script as a scheduled task, use C:\PROGRA~1\ArcGIS\Pro\bin\Python\Scripts\propy for the program or script, and include the full path to the Python script in all arguments.” So the task’s action is that program, with the script’s full path as its argument. We tested the same call through a small wrapper, whose last line passes the job’s exit code on to whatever launched it:

@echo off
call "C:\PROGRA~1\ArcGIS\Pro\bin\Python\Scripts\propy" "%~dp0s1_nightly_job.py"
set RC=%ERRORLEVEL%
echo EXITCODE=%RC%
exit /b %RC%

The job it calls builds its paths from the script’s own full path, so they do not change with the run-as account. It treats a missing input as a failure, sets overwriteOutput itself, stamps its output name, and sets up its log before it imports arcpy:

"""S1 - a stand-alone job written to be run unattended by Windows Task Scheduler via propy.
Paths are built from the script's own full path, so they do not change with the run-as account.
A missing input is a failure, never something the job quietly rebuilds. Logging is set up
before arcpy is imported, and the import runs inside the try, so a failure there is logged too."""
import datetime, logging, os, sys

ROOT = os.path.dirname(os.path.abspath(__file__))
GDB = os.path.join(ROOT, "scratch.gdb")
logging.basicConfig(filename=os.path.join(ROOT, "s1_nightly_job.log"), level=logging.INFO,
                    format="%(asctime)s %(levelname)s %(message)s")

def main():
    import arcpy
    logging.info("product=%s python=%s", arcpy.ProductInfo(), sys.executable)
    src = os.path.join(GDB, "sites")
    if not arcpy.Exists(src):
        raise FileNotFoundError(f"input missing: {src}")
    arcpy.env.overwriteOutput = True
    stamp = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
    out = os.path.join(GDB, f"sites_buffer_{stamp}")
    res = arcpy.analysis.Buffer(src, out, "100 Meters")
    n = int(arcpy.management.GetCount(res[0])[0])
    logging.info("wrote %s with %d features; messages:\n%s", out, n, res.getMessages())
    print(f"OK {os.path.basename(out)} count={n}")

if __name__ == "__main__":
    try:
        main()
    except Exception:
        logging.exception("job failed")
        print("FAILED - see log", file=sys.stderr)
        sys.exit(1)

We ran it through the wrapper twice: first before a separate setup script had created the three-point sites feature class, then after. The first run wrote FileNotFoundError: input missing and its traceback to the log, and the wrapper itself returned 1 to its caller:

FAILED - see log
EXITCODE=1
OK sites_buffer_20261022134011 count=3
EXITCODE=0

The exit code is ATS practice, not Esri documentation: every failure inside the try, the arcpy import included, becomes a log line and sys.exit(1), so a failed run leaves a record. Whether Task Scheduler’s own last-run result shows that code is Windows behavior that Microsoft’s page does not spell out, so read the log, not only the scheduler. Each successful run also adds a new sites_buffer_ feature class, so this job needs the same cleanup as %t%.

A script like this runs outside Pro, so one of four conditions must hold, or import arcpy raises RuntimeError: NotInitialized. The four are: Sign me in automatically is checked, Pro is open, Pro is authorized to work offline (if your administrator allows it), or Remember my certificate is checked (PKI).

What breaks the first unattended run

Where the record lives

The Scheduled Tools section of the History pane lists every tool scheduled on the machine under your account, “regardless of the project from which the tools were scheduled,” and each run adds a time-stamped item marked as succeeded, completed with warnings, or failed. Scheduling also writes a folder with a Python script under %localappdata%\Esri\ArcGISPro\Geoprocessing\<name>, and you may edit that script to add more tools. Be careful with that: Delete Schedule removes “the associated scripts, log files, and folders,” so edits you made there go with it.

A record only helps once a run has happened. A job that never starts, because the machine was signed out, writes no log line of its own. Our practice is to have each successful run leave a time stamp, and to have something else check that time stamp and alert a named person when it goes stale. Do not lean on Task Scheduler’s email or message actions for that; both are “marked deprecated by Windows.”

If no desktop should own the job at all, ArcGIS Online can run scheduled notebook tasks instead, and those are metered. At the time of writing (October 2026), the ArcGIS Online credits page lists “1.5 credits per hour, per run using the Standard runtime, calculated per minute,” and 4.5 credits per hour on the Advanced runtime. Whether your job’s code runs unchanged in a hosted notebook is a separate check that this post does not cover.

If you are not the one writing the scripts: ask three questions before you rely on a scheduled job. Which account does it run as, and does that account have its own license? Does the job need the machine signed in, and who keeps it that way? Where does a failure, or a run that never happened, show up, and who reads it the morning after? A good answer names one account, one machine and one person.

References

Have a Pro job someone still runs by hand?

We can help you decide whether it belongs in a model or a script, and set it up to run unattended without surprises. Book a free intro call and bring the job with you.

Book a free intro call