Meraki Auto Reboot
Schedule the reboot script to run at 7 AM daily:
Retrieve API Key and Serial Number
- Serial Number: Organization > License Info > Devices
- API Key: Organization > Settings > Dashboard API access
Crontab
Schedule the reboot script to run at 7 AM daily:
0 7 * * * /usr/bin/bash /root/schedule_reboot_meraki.shbash
Script
Create the script /root/schedule_reboot_meraki.sh:
#!/bin/bash
SERIAL=""
APIKEY=""
curl -L --request POST \
--url https://api.meraki.com/api/v1/devices/$SERIAL/reboot \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "X-Cisco-Meraki-API-Key: $APIKEY"bash