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
kian2y 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
philbookstOP2y ago
wow that was fast, thank you kian!
Want results from more Discord servers?
Add your server