Send a Discord Webhook Notification from Cron
To ping a Discord channel from cron, POST to your webhook URL with curl. The whole thing is one line in the crontab.
The command
Create a webhook in Discord (Channel settings → Integrations → Webhooks) and copy its URL. Then:
0 9 * * * curl -H "Content-Type: application/json" -d '{"content":"Daily job done"}' https://discord.com/api/webhooks/ID/TOKEN
Report a command's result
Build the message from a variable so you can send real status:
0 9 * * * MSG=$(/path/job.sh 2>&1); curl -H "Content-Type: application/json" -d "{\"content\":\"$MSG\"}" $WEBHOOK
Percent-sign trap
Cron treats % as a newline. If your JSON or date format contains a literal %, escape it as \% or move the logic into a script the cron line calls.
FAQ
How do I send a Discord message from cron?
POST to your Discord webhook with curl: curl -H 'Content-Type: application/json' -d '{"content":"..."}' <webhook-url>. Put the whole command on one crontab line.
How do I include a command's output in the Discord message?
Capture it into a variable first: MSG=$(/path/job.sh 2>&1); then interpolate $MSG into the JSON payload.
Why does my Discord cron job break on % signs?
Cron reads % as a newline. Escape any literal percent as \% or move the command into a script that the cron line calls.