Hi, Can someone clear this doubt “How can I schedule regular OTA updates for my Raspberry Pi-based IoT devices?”
Cron jobs and update scripts can be used to automate the process of scheduling routine OTA updates for your Raspberry Pi-based IoT devices. Make sure your Raspberry Pi is configured to check for updates first. To download and install updates, use regular system update commands like sudo apt update && sudo apt upgrade -y. Next, create a cron job to schedule these updates. Enter crontab -e in the terminal to launch the crontab editor. To specify when you want the updates to happen, add a new cron job. For instance, you would add the line 0 2 * * * sudo apt update && sudo apt upgrade -y to perform updates daily at 2 AM.
For more clarification please check the given link