RHEL 8 based operating systems can take advantage of the dnf-automatic package for easy scheduling of dnf updates. dnf-automatic supports downloading, applying, notifications, randomization of start time, and other options.
dnfinstalldnf-automatic
vim/etc/dnf/automatic.conf
# configure as needed or use following sed commands to enable patching
sed-i's|apply_updates = no|apply_updates = yes|g'/etc/dnf/automatic.conf
sed-i's|random_sleep = 0|random_sleep = 30|g'/etc/dnf/automatic.conf
systemctl--nowenablednf-automatic.timer