Just put it in a script, then create a cron job that calls the script. ^ quick and dirty, but should be close to getting the job done. Reposync -repoid=rhel-7-server-rpms -p $TMP_REPO_DIR -downloadcomps -download-metadata -n # Delete the repo folder if it exists already The better and free solution IMO is to have a weekly cron job that does a reposync/createrepo, then copy the repo over to your offline environment and share it via NFS or HTTP. This means that if you try moving the rpm files to another server that has a different set of packages installed, then your yum command will fail and you'll get stuck in this dependency hell of getting yumdownloader to download all the packages you need for every server. I find that the -resolve flag only downloads the dependencies for the specific server that you run the yumdownloader command on.
REDHAT LINUX PATCHES UPDATE
Yumdownloader will work if you're only looking to update specific packages, but IMO it can be very annoying.
![redhat linux patches redhat linux patches](https://www.jobacle.nl/wp-content/uploads/2016/03/switch_to_rhel.jpg)
Rocky Linux is led by Gregory Kurtzer, founder of the CentOS project. It is under intensive development by the community. firstly, RHEL is the main Linux Distribution whereas OLE is just a clone version of RHEL with some enhancements in Kernel to makes it more compatible with Oracle hardware and software. Though, patching is the main feature of Satellite. Rocky Linux is a community enterprise operating system designed to be 100 bug-for-bug compatible with Americas top enterprise Linux distribution now that its downstream partner has shifted direction. I have been working on both Linux (RHEL from RedHat and OLE from Oracle) in many projects for more than 10 years now. However, it does cost money and it might be a little overkill if you only care about patching and none of the other features that it offers.
![redhat linux patches redhat linux patches](https://pbs.twimg.com/media/D592xFBXsAADYHJ.png)
![redhat linux patches redhat linux patches](https://docs.bmc.com/docs/ServerAutomation/86/files/631766206/631766217/1/1459291572093/LinuxPatchTargets.gif)
It's called Red Hat Satellite, and it's an excellent product. Red Hat does offer a product that handles this specific use case.