Click here to go to the forum index Click here for the home page
 
Author Message

<  TAP and patch development  ~  Email Viewer

Page 2 of 2
Goto page Previous  1, 2
EMJB
Posted: Sat Mar 06, 2010 1:28 pm Reply with quote
Frequent contributor Joined: 08 Jul 2005 Posts: 3632 Location: Maldon Essex
billmars wrote:
Maybe a crontab entry like this:-
Code:
@reboot root /public/EmailViewer/toppyemail.sh
will suffice?


My ignorance of Linux is >= yours, so can only suggest you try it!

EMJB
View user's profile Send private message
billmars
Posted: Mon Mar 08, 2010 1:01 am Reply with quote
Frequent contributor Joined: 17 Sep 2005 Posts: 761
There's something funny going on when ToppyEmail is run as a cron job.
When it's running, I've noticed that none of my other cron jobs run.
To prove it I killed all Toppymail running processes, and at once all my
other cron jobs started (rt2mei and ntpclient in particular).
I'll try to limit ToppyEmail MaxRunLoops to 1 to see if this changes things.

_________________
BM
Firmware
5800 Samsung 1Tb Autostart TAPs: Extend 1.7;TSRCommander 1.5;TF5000 Display 1.53;EPG2MEI 0.95;MyStuff 6.6;QuickJump 1.72;Power Down 0.75;SecCache 0.4;TSSaver 0.4;MHEG Control B2;eit_sub_sng 0.6 Transmitter: Belmont Extras: as2mei (via NSLU2)
View user's profile Send private message TF5800
EMJB
Posted: Mon Mar 08, 2010 9:01 am Reply with quote
Frequent contributor Joined: 08 Jul 2005 Posts: 3632 Location: Maldon Essex
billmars wrote:
There's something funny going on when ToppyEmail is run as a cron job.
When it's running, I've noticed that none of my other cron jobs run.
To prove it I killed all Toppymail running processes, and at once all my
other cron jobs started (rt2mei and ntpclient in particular).
I'll try to limit ToppyEmail MaxRunLoops to 1 to see if this changes things.


If you are going down that route, don't forget to enable the call to "get_history_and_log" or you will keep getting alerts for emails until you read them on your PC.

EMJB
View user's profile Send private message
billmars
Posted: Mon Mar 08, 2010 12:02 pm Reply with quote
Frequent contributor Joined: 17 Sep 2005 Posts: 761
EMJB wrote:
don't forget to enable the call to "get_history_and_log" or you will keep getting alerts for emails until you read them on your PC.
EMJB


Can you give me a clue as to how to do this. I've looked at the code but I can't find anything obvious to change - I don't do code!
As you say, each new run of ToppyEmail is finding the same emails.

Things are looking a bit more promising.
Changing ToppyEmail MaxRunLoops to 1, so that it shuts down after each run, has enabled ntpclient to run from crontab.
I'm waiting to see if my daily rt2mei runs correctly at 10:55. (it is)

Something I found that fouled up crontab running correctly was in editing the file to add ToppyEmail and not finishing the file with a 'newline'. Crontab won't run the last line if there isn't a carriage return at the end of the file. There is only a log file entry along the lines of 'crontab has malformed input line 45'.

_________________
BM
Firmware
5800 Samsung 1Tb Autostart TAPs: Extend 1.7;TSRCommander 1.5;TF5000 Display 1.53;EPG2MEI 0.95;MyStuff 6.6;QuickJump 1.72;Power Down 0.75;SecCache 0.4;TSSaver 0.4;MHEG Control B2;eit_sub_sng 0.6 Transmitter: Belmont Extras: as2mei (via NSLU2)
View user's profile Send private message TF5800
EMJB
Posted: Mon Mar 08, 2010 12:11 pm Reply with quote
Frequent contributor Joined: 08 Jul 2005 Posts: 3632 Location: Maldon Essex
billmars wrote:
Can you give me a clue as to how to do this. I've looked at the code but I can't find anything obvious to change - I don't do code!
As you say, each new run of ToppyEmail is finding the same emails.

At line 74 (between"my $toppy_log_file = "\\ProgramFiles\\Logs\\Email_log.txt";" and "&process_emails;" add a line "&get_history_and_last_log". I thought I had commented it out, but I had removed it completely.

EMJB
View user's profile Send private message
billmars
Posted: Mon Mar 08, 2010 4:06 pm Reply with quote
Frequent contributor Joined: 17 Sep 2005 Posts: 761
Many thanks - I was looking for something along those lines!
I've added that now, so we'll see how things go.

The reason I'm using a cron job, is that I was put off trying to start ToppyEmail at boot-up because when I tried to, my NSLU2 didn't boot up properly and I was in fear of loosing it altogether. I had a feeling it may have been something to do with booting up the NSLU2 when the Topfield was turned off, and ToppyEmail was hanging and preventing the NSLU2 from completing its boot. But I may be well off target here, could have been all sorts of other things!

_________________
BM
Firmware
5800 Samsung 1Tb Autostart TAPs: Extend 1.7;TSRCommander 1.5;TF5000 Display 1.53;EPG2MEI 0.95;MyStuff 6.6;QuickJump 1.72;Power Down 0.75;SecCache 0.4;TSSaver 0.4;MHEG Control B2;eit_sub_sng 0.6 Transmitter: Belmont Extras: as2mei (via NSLU2)
View user's profile Send private message TF5800

Display posts from previous:  

All times are GMT + 1 Hour
Page 2 of 2
Goto page Previous  1, 2

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum