---
title: Cron triggers are now supported in Python Workers
description: You can now set up scheduled handlers in your Python Workers
image: https://edgetunnel-b2h.pages.dev/changelog-preview.png
---

> Documentation Index  
> Fetch the complete documentation index at: https://edgetunnel-b2h.pages.dev/changelog/llms.txt  
> Use this file to discover all available pages before exploring further. 

[Skip to content](#%5Ftop) 

# Changelog

New updates and improvements at Cloudflare.

[ Subscribe to RSS ](https://edgetunnel-b2h.pages.dev/changelog/rss/index.xml) [ View RSS feeds ](https://edgetunnel-b2h.pages.dev/fundamentals/new-features/available-rss-feeds/) 

![hero image](https://edgetunnel-b2h.pages.dev/_astro/hero.CVYJHPAd_26AMqX.svg) 

[ ← Back to all posts ](https://edgetunnel-b2h.pages.dev/changelog/) 

## Cron triggers are now supported in Python Workers

Apr 24, 2025 

[ Workers ](https://edgetunnel-b2h.pages.dev/workers/) 

You can now create Python Workers which are executed via a cron trigger.

This is similar to how it's done in JavaScript Workers, simply define a scheduled event listener in your Worker:

**Python**

```python
from workers import handler


@handler
async def on_scheduled(event, env, ctx):
  print("cron processed")
```

Define a cron trigger configuration in your Wrangler configuration file:

* [  wrangler.jsonc ](#tab-panel-2919)
* [  wrangler.toml ](#tab-panel-2920)

**JSONC**

```jsonc
{
  "triggers": {
    // Schedule cron triggers:
    // - At every 3rd minute
    // - At 15:00 (UTC) on first day of the month
    // - At 23:59 (UTC) on the last weekday of the month
    "crons": [
      "*/3 * * * *",
      "0 15 1 * *",
      "59 23 LW * *"
    ]
  }
}
```

**TOML**

```toml
[triggers]
crons = [ "*/3 * * * *", "0 15 1 * *", "59 23 LW * *" ]
```

Then test your new handler by using Wrangler with the `--test-scheduled` flag and making a request to `/cdn-cgi/handler/scheduled?cron=*+*+*+*+*`:

```sh
npx wrangler dev --test-scheduled


curl "http://localhost:8787/cdn-cgi/handler/scheduled?cron=*+*+*+*+*"
```

Consult the [Workers Cron Triggers page](https://edgetunnel-b2h.pages.dev/workers/configuration/cron-triggers/) for full details on cron triggers in Workers.

```json
{"@context":"https://schema.org","@type":"BlogPosting","@id":"https://edgetunnel-b2h.pages.dev/changelog/post/2025-04-22-python-worker-cron-triggers/#page","headline":"Cron triggers are now supported in Python Workers · Changelog","description":"You can now set up scheduled handlers in your Python Workers","url":"https://edgetunnel-b2h.pages.dev/changelog/post/2025-04-22-python-worker-cron-triggers/","inLanguage":"en","image":"https://edgetunnel-b2h.pages.dev/changelog-preview.png","dateModified":"2025-04-24","datePublished":"2025-04-24","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://edgetunnel-b2h.pages.dev/#website","name":"Cloudflare Docs","url":"https://edgetunnel-b2h.pages.dev/"}}
```
