cron-apt is a flexible program that can manage automating apt via cron.
Step1. Install cron-apt in Debian
apt-get install cron-apt
Step2. Configure it:
The configuration file is located in /etc/cron-apt/ directory.
For a basic configuration I have everything set to default except for two lines in /etc/cron-apt/config file
You can also modify when the cron-apt runs in the