LinHES Forums
http://forums.linhes.org/

email upcoming recordings
http://forums.linhes.org/viewtopic.php?f=3&t=17347
Page 1 of 1

Author:  mythedoff [ Wed Nov 28, 2007 6:23 pm ]
Post subject:  email upcoming recordings

The program sendEmail has already been covered in the forum which needs to be working first.

Code:
# cat /usr/src/sendemail/upcoming.sh
#! /bin/bash
lynx -dump http://localhost:6544 | sed -n '/^Schedule$/,/^Job\ Queue$/p' | sed  '/^Schedule$\|^Job\ Queue$/d' > /usr/src/sendemail/upcoming.txt
perl /usr/bin/sendEmail.pl -f <fromEmailAddress> -t <toEmailAddress> -u "Upcoming Shows" -s <mailServerAddress> -o message-file=/usr/src/sendemail/upcoming.txt


I added to /etc/crontab
Code:
05 16   * * *   root /usr/src/sendemail/upcoming.sh >> /dev/null 2>&1


To run from the command line:

Code:
# /usr/src/sendemail/upcoming.sh


Permissions on upcoming:
Code:
# ls -l /usr/src/sendemail/upcoming.sh
-rwx--x--x 1 root src 503 Nov 28 15:46 /usr/src/sendemail/upcoming.sh

Author:  Too Many Secrets [ Thu Nov 29, 2007 8:39 am ]
Post subject: 

Nice! I'd been looking for something like this. Thx

We need a thread/wiki of (stupid) email tricks that people are doing. I love getting daily updates from my box telling me what recorded, is going to record, etc.

PS I'll work on the wiki page.

<edit> wiki page here. please add others.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/