# Monitor Python scripts and jobs with HookPulse

Call the check-in URL with the standard library when the script ends, and the failure URL when it raises.

HookPulse · Updated 2026-10-14

## Step 1. Create the monitor

Add a routine named python-job and set how often the job runs. Its page shows the check-in URL: use it in place of https://hookpulse.net/in/YOUR_ID.

## Step 2. Check in at the end of the script

Put your job in run_job. urllib is in the standard library.

```
import urllib.request

HOOKPULSE_URL = "https://hookpulse.net/in/YOUR_ID"


def check_in(path=""):
    urllib.request.urlopen(HOOKPULSE_URL + path, timeout=10)


try:
    run_job()
    check_in()
except Exception:
    check_in("/fail")
    raise
```

## Step 3. Run it once

Run the script once with python3. The routine shows the first check-in. From then on, a missed or failed run sends the alert.

[Create the monitor](https://hookpulse.net/?routine=python-job&every=86400#routines)

[Monitor Python scripts and jobs with HookPulse](https://hookpulse.net/guides/python)
