[mythtv-users] Queuing commercial flagging from cron
Tom Dexter
digitalaudiorock at gmail.com
Tue Apr 15 16:40:33 UTC 2008
On Mon, Mar 31, 2008 at 7:25 PM, Tom Dexter <digitalaudiorock at gmail.com> wrote:
> On Mon, Mar 31, 2008 at 7:23 PM, Tom Dexter <digitalaudiorock at gmail.com> wrote:
> >
> > For my purposes, I think something as simple as this would do it:
> >
> > #!/bin/bash
> > YESTERDAY_MIDNIGHT=`date -d yesterday +%Y%m%d000000`
> > exec mythcommflag --queue --allafter $YESTERDAY_MIDNIGHT
> >
> > ...and have that run at about 3AM. I think that'll do it.
> >
> > Tom
> >
>
> Duh...except that should have been "--allstart":
>
>
> #!/bin/bash
> YESTERDAY_MIDNIGHT=`date -d yesterday +%Y%m%d000000`
> exec mythcommflag --queue --allstart $YESTERDAY_MIDNIGHT
>
> Tom
>
Just a note for anyone else who sets up something like this. If your
crontab is set up to assign HOME=/ you'll get the following errors
trying to run mythcommflag (as of 0.21):
2008-04-14 03:10:05.225 Using runtime prefix = /usr, libdir = /usr/lib
2008-04-14 03:10:05.226 Cannot locate your home directory. Please set
the environment variable HOME or MYTHCONFDIR
2008-04-14 03:10:05.226 Failed to init MythContext, exiting.
I just added:
export HOME=/home/mythtv
...to my script.
Tom
More information about the mythtv-users
mailing list