DEV Community

Discussion on: What do you use Cron jobs for?

Collapse
 
ahferroin7 profile image
Austin S. Hemmelgarn

One of the more 'unconventional' cron jobs I have on one of my systems fires off an Ansible playbook that runs memory compaction and wipes free RAM in all the VM test environments on the system on a nightly basis. This originated back when the system had a very limited amount of RAM and I needed to ensure that none of the VMs used too much over a long period of time, but I've kept it around despite having more than enough RAM now because it actually improves behavior of KSM and THP on the host side, which in turn means the VMs run a bit faster on average.

One of the other interesting ones I have running on one of my systems is used to update the number of CPUs visible to BOINC based on the ambient air temperature in the room (measured using a USB connected thermometer) and the time of day so that the computer doesn't add too much to the thermal load of the HVAC system at times when it might be an issue.