-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpvoutput.sh
More file actions
17 lines (16 loc) · 732 Bytes
/
pvoutput.sh
File metadata and controls
17 lines (16 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
# ---------------------------------------------------------------
# A script to keep the combine_two_pvoutput_systems.py script running.
# Add to your crontab to run once a day, e.g. at 05:04 and at reboot
# 4 5 * * * ~/solis/pvoutput.sh > /dev/null
# @reboot sleep 243 && ~/solis/pvoutput.sh > /dev/null
# ---------------------------------------------------------------
script_name=$(basename -- "$0")
cd ~/solis
now=$(date)
if pidof -x "$script_name" -o $$ >/dev/null;then
echo "$now: $script_name already running" >> pvoutput.crontab.log 2>&1
exit 1
fi
echo "WARNING: $now: $script_name NOT running" >> pvoutput.crontab.log 2>&1
/usr/bin/python -u ~/solis/combine_two_pvoutput_systems.py >> pvoutput.log 2>&1