[cron] adding all cron-scripts

This commit is contained in:
Felix Buehler 2017-01-27 21:31:32 +01:00
parent c3b682b26f
commit 749a7f45af
3 changed files with 73 additions and 0 deletions

15
cron/webcam.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
## 0 * * * * cd ~/.dotfiles/cron/ && bash webcam.sh
now=$(date +"%Y_%m_%d_%H_%M_%S")
path="$HOME/Pictures/hour-pics/"
size="1280x720"
mkdir -p $path
streamer -q -f jpeg -s $size -o $path$now.jpeg -r 1
grey="$(python3 ./blackcheck.py -i $path$now.jpeg -d 10)"
# echo $grey
if [ "$grey" = "True" ] ; then
# echo "Has to move"
mv $path$now.jpeg ${path}black/$now.jpeg
fi
exit 0