/ Published in: Bash
These are two separate code snippets. One is for a crontab, the other to be run by cron.
Together they create a new folder every day and fills it with 240 jpeg images (10 per hour) of whatever it is that you're doing.
The next step for me is to figure out how to automate the process of turning these into frames in a slideshow/video automatically from a daily script...
...becauseitwouldbeawesome.
Expand |
Embed | Plain Text
#! /bin/bash ################################ ## name this: daily_sshots.sh ## ################################ year=`date +%Y` month=`date +%m` day=`date +%d` now=`date +%Y%m%d%H%M%S` uname=//your user name mkdir -p /home/$uname/Pictures/daily_screenshots/$year/$month/$day DISPLAY=:0 scrot /home/$uname/Pictures/daily_screenshots/$year/$month/$day/sshot$now.jpg ####################################### ## Then in a crontab via: crontab -e ## ####################################### # m h dom mon dow command */6 * * * * sh /path/to/above/code/in/file/daily_sshots.sh
You need to login to post a comment.
