[CRTech] Christian Radio Tech [MSG 83590]
[Thread Prev] [-- Thread Index --] [Thread Next] [Date Prev] [-- Date Index --] [Date Next]
Re: Help writing a batch file
To: CRTech <crtech@crtech.org>
Subject: Re: Help writing a batch file
From: George Lake <galakejr@gmail.com>
Date: Tue, 21 Aug 2018 09:35:30 -0400
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to; bh=7nt4jpKdBi4Bj+kopHn1QNF41a1XZ+Z79T6D7FOXc+Q=; b=nFAJoO39me67Jh2Qc//kdw/w3fBP1mpwBbDU0s59aVji8m3WlF4Fi77ymYQ4cFemGT fLnXrX6W+Wq889WEoAWfB6bXaI/ymxnSisQn2vIsjZRmMEfdEykItaFE8HiZgOuxS8qL hglj8Tcz32Gz3K8Rbun1R4b5bJ+ISyj06JCOGDpAj/F3W4pP/asCriaMrVc2bnoQGBUv 3T6bUaIOwiDapPKFWtEA9gfj/a4zQyk7LFaiKaOE1MXOXxMN8rS0Hsa8cNy5eyJukihs ypR5jZ3ywdZRlCRcJJ3vfdnfAmrqx1l+d4sYKFFRC8WfFbufV4oiHalAQEnz7jps2fqW xdbg==
In-reply-to: <CAECowXuVM=TamVNCfLeuQySRutNbs0wKKj1doEJ0G0MVt7xscQ@mail.gmail.com>
References: <CAECowXuVM=TamVNCfLeuQySRutNbs0wKKj1doEJ0G0MVt7xscQ@mail.gmail.com>
Reply-to: galakejr@gmail.com

I have written a python3 script that does exactly what you are looking for.  After our staff failed to transfer a log to the AudioVault system and it stopped at midnight,  I asked the folks at BE about a utility that would check for the presence  next days log, but they didn't have one so I wrote one of my own. It has been running for about a month here at WCSG.  The script will send a text (using Verizon's  phonenumber@vtext.com) or email every evening notifying the recipient either "Good news a log for tomorrow exists" or "Warning!! A log file for tomorrow is not available".  Having it send a message every evening verifies that it is running.  Also it will continue to send a message every 10 minutes until a log file is found.

Using a .json file for configuration the utility can be customized with the following parameters:
message when log exists
delay between messages
time to start checking
time to stop checking
email server config
message recipient(s)
path to the log file
file extention (in my case .evx)

It also writes some information to a log file for verification and trouble shooting.

On Tue, Aug 21, 2018 at 5:17 AM Mark McMillan <markmwecc@gmail.com> wrote:
I was hoping that someone who is more prolific in batch writing could help with a script.  

I need a batch that will check to see if a log file exists for tomorrow and email me if it doesn't.  
If email isn't an option, then a screen message would be ok.  

Log filename is the date as MMDDYY


Mark McMillan
Operations Manager
The Lighthouse WECC FM 89.3

George A Lake 
(989) 390-1801
References: Help writing a batch file
(Mark McMillan <markmwecc@gmail.com>, 20 Aug 2018 17:17:45 -0000)
Prev by date: Re: TFT EAS930A FM module needed
(Reginald Swedberg, 21 Aug 2018 13:32:31 -0000)
Next by date: List emails filtering to spam
(Matthew Chambers, 22 Aug 2018 06:15:07 -0000)
Prev by thread: Help writing a batch file
(Mark McMillan, 20 Aug 2018 17:17:45 -0000)
Next by thread: TFT EAS930A FM module needed
(Pat Wahl, 20 Aug 2018 20:56:50 -0000)