Sunday, July 11, 2010

when cpu isn't busy it is time to run my program

If you want to run a program/command when the cpu is free or not very busy, the tool you need is batch. it only executes commands when the system load level permits. In other words, when the load average drops below 1.5 or the value specified in the invocation of atd


ex:- zodiac@zodioc:~$ echo tar czf ~/Desktop/nabard.tar.gz ~/Desktop/nabard | batch
warning: commands will be executed using /bin/sh
job 2 at Sun Jul 11 16:06:00 2010

No comments:

Post a Comment