How can I run a job when the server load is low?
Posted
by jberryman
on Server Fault
See other posts from Server Fault
or by jberryman
Published on 2010-04-14T23:15:36Z
Indexed on
2010/04/14
23:23 UTC
Read the original article
Hit count: 265
I have a command that runs a disk snapshot (on EC2, freezing an XFS disk and running an EBS snapshot command), which is set to run on a regular schedule as a cron job. Ideally I would like to be able to have the command delayed for a period of time if the disk is being used heavily at the moment the task is scheduled to run.
I'm afraid that using nice/ionice might not have the proper effect, as I would like the script to run with high priority while it is running (i.e. wait for a good time, then finish fast).
Thanks.
© Server Fault or respective owner