at can schedule our commands to run at the exact time we need them to, but can we schedule commands to run when systems are inactive?
echo "some_commands" | when 'cpu < 15%'
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
hmmm... I don't think so... but what you could do is cron a script to run like every 5 minutes and check the load average to see if it's acceptably low. I wouldn't check the current because you could get the cpu in between 2 really high peaks. This is just thoughts on what I'd do to accomplish this, but there might be a better way.
Fcron has a lot of additional features over common cronds. For example:
(quote from the Homepage)
Thus, you could use fcron to setup what you want.