How to create a trigger only for a specific environment?

I've tried deploying my wrangler.toml like this:
[env.production]
name = "workername-production"
[triggers]
crons = ["0 */2 * * *", "0 */6 * * *"]
[env.production]
name = "workername-production"
[triggers]
crons = ["0 */2 * * *", "0 */6 * * *"]
but it also deploys the trigger for my staging environment. Thanks for your help!
2 Replies
kian
kian16mo ago
[env.production]
name = "workername-production"
triggers.crons = ["0 */2 * * *", "0 */6 * * *"]
[env.production]
name = "workername-production"
triggers.crons = ["0 */2 * * *", "0 */6 * * *"]
or
[env.production]
name = "workername-production"
[env.production.triggers]
crons = ["0 */2 * * *", "0 */6 * * *"]
[env.production]
name = "workername-production"
[env.production.triggers]
crons = ["0 */2 * * *", "0 */6 * * *"]
philbookst
philbookst16mo ago
wow that was fast, thank you kian!