lavary / crunz

A PHP-based job scheduler
MIT License
1.42k stars 136 forks source link

Does this library support system load average thresholds like fcron? #378

Open Bilge opened 2 years ago

Bilge commented 2 years ago

Description
fcron has a feature to avoid starting jobs whilst system load is too high. It does this with configuration options such as lavg, or lavg1, lavg5 and lavg15 options which specify the threshold under which the system must be operating to begin the job. It may be combined with until to specify a timeout period after which the job would run regardless of load.

Example

# wait a maximum of 5 hours every day for a fall of the load average
@lavgand,lavg(1,2.0,3.0),until(5h) 1d echo "Load average is going down" 

For more, see fcrontab (5).

davidsneighbour commented 2 years ago

This library runs via cron and can run shell scripts. So if you want to run a shell script do it and take care that it does not time out. The job you are running is irrelevant if you control the duration of the job and the time out option. Read the documentation for more information.

PabloKowalczyk commented 2 years ago

Hello, this functionality is not supported.