Site Tools


linux:raspberry:picam:scripts:copyjob

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:raspberry:picam:scripts:copyjob [2017/11/29 16:59] lunetikklinux:raspberry:picam:scripts:copyjob [2019/01/09 18:53] (current) lunetikk
Line 36: Line 36:
 </code> </code>
  
-Make sure you use <code>chmod +x cronjob.sh</code> to make it executeable.\\+Make sure you use <code>chmod +x copyjob.sh</code> to make it executeable.\\
 Create a cronjob for it by inserting the following line to the end in<code> vi /etc/crontab</code> <code sh crontab>0 * * * * /records/copyjob.sh >/dev/null 2>&1</code> Create a cronjob for it by inserting the following line to the end in<code> vi /etc/crontab</code> <code sh crontab>0 * * * * /records/copyjob.sh >/dev/null 2>&1</code>
 The job will be executed everytime the clock hits 0 minutes (for example 1:00pm 2.00am...) The job will be executed everytime the clock hits 0 minutes (for example 1:00pm 2.00am...)
Line 46: Line 46:
 find $BASEPATH -name ".jpg" -exec mv {} $NETPATHJPG \; find $BASEPATH -name ".jpg" -exec mv {} $NETPATHJPG \;
 </code>  </code> 
 +
 +Like this:
 +
 +<code bash>
 +find $BASEPATH -name ".avi" -exec mv {} $COPYPATH \;
 +sleep 10
 +find $BASEPATH -name ".jpg" -exec mv {} $COPYPATH \;
 +sleep 10
 + 
 +find $COPYPATH -name ".avi" -exec mv {} $NETPATHAVI \;
 +sleep 10
 +find $COPYPATH -name ".jpg" -exec mv {} $NETPATHJPG \;
 +sleep 10
 +</code>
  
 \\ \\
 \\ \\
 ~~DISCUSSION:closed~~ ~~DISCUSSION:closed~~
linux/raspberry/picam/scripts/copyjob.1511971180.txt.gz · Last modified: 2017/11/29 16:59 by lunetikk