Difference between revisions of "Run scripts more than once per minute"
From PhotoVoltaic Logger new generation
(Created page with "Category:ScriptsCategory:HowTo If you run the scripts by cron, the most often frequency is once per minute. PVLng offers a wrapper script <tt>PVLng-run.sh</tt> to ru...") |
(No difference)
|
Revision as of 18:54, 12 July 2014
If you run the scripts by cron, the most often frequency is once per minute.
PVLng offers a wrapper script PVLng-run.sh to run a script more than once per minute.
# ./PVLng-run.sh -h Run command each period seconds for 1 minute. Use in cron with cron period * for each minute. Usage: PVLng-run.sh [options] -- command parameter1 parameter2 ... Options: -p Period in seconds, default: 60 (run once) -t Test mode -v Set verbosity level to info level -vv Set verbosity level to debug level -h Show this help
I monitor my power consumption and my SMA inverters with the following cron tab entries:
# Fetch plant data each 30s, run mostly during daylight times mostly * 4-22 * * * ~/PVLng-run.sh -p 30 -- ~/SMA/Webbox.sh -s Inverters.conf * 4-22 * * * ~/PVLng-run.sh -p 30 -- ~/SMA/Webbox.sh -s Sensorbox.conf # Fetch consumption data each 15s * * * * * ~/PVLng-run.sh -p 15 -- ~/S0/S0.sh -s Consumption.conf
Don't forget to divide the real script name and its parameters with the "--"