|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
2K3 batch file to send alertSo you have a little batch file in a win 2003 server that gets fired up on a
regular basis by the job scheduler to do something or check something and if it runs into a problem, it needs to contact a human for help. Are there any good ways to do that? Here is what I can think of or find: - Send an email by calling a CScript .vbs file and use CDONTs to contact a local email server and SMTP a message to someone. This is a kludge on a hack and you better hope you have the email server set up. - Install a little program like blat to send the email for you. Again, make sure you don't change the email server and forget about this script and its (now incorrect) config. - Net send, but that seems to have been removed or doesn't work unless the user has a windows messaging client running. - Copy a READMENOW.TXT file onto the administrators desktop and wait for him or her to log in again? There has got to be a better way, no? James Newton: PICList webmaster/Admin mailto:jamesnewton@... 1-619-652-0593 phone http://www.piclist.com/member/JMN-EFP-786 PIC/PICList FAQ: http://www.piclist.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: 2K3 batch file to send alertOn 25/03/2008, James Newton <jamesnewton@...> wrote:
> So you have a little batch file in a win 2003 server that gets fired up on a > regular basis by the job scheduler to do something or check something and if > it runs into a problem, it needs to contact a human for help. > > Are there any good ways to do that? Here is what I can think of or find: > > - Send an email by calling a CScript .vbs file and use CDONTs to contact a > local email server and SMTP a message to someone. This is a kludge on a hack > and you better hope you have the email server set up. > > - Install a little program like blat to send the email for you. Again, make > sure you don't change the email server and forget about this script and its > (now incorrect) config. > > - Net send, but that seems to have been removed or doesn't work unless the > user has a windows messaging client running. > > - Copy a READMENOW.TXT file onto the administrators desktop and wait for him > or her to log in again? > > There has got to be a better way, no? > > > James Newton: PICList webmaster/Admin > mailto:jamesnewton@... 1-619-652-0593 phone > http://www.piclist.com/member/JMN-EFP-786 > PIC/PICList FAQ: http://www.piclist.com > > Send an SMS (text) message to a cellphone? (via your cellphone provider, or possibly one of the "free" services that (used to ?) let you send x free messages a day. Not sure how well it works as it rarely worked for me (in NZ) but I know I can set it up with Vodafone or Telecom if I'm willing to pay 20c a text. RP -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: 2K3 batch file to send alertA cmd/bat file and blat always work for me. Use gmail as the smtp server
perhaps - it's always there. Write progress to a text file too, as a log. You can send to cell phone via the domains the majors have set up for email to sms. Use 2 servers to send the msg, so if you get the msg only once, one server was done or the config wrong. Redundancy. You can also have a second machine get email from a pre-assigned acct set up just for this, and use perl or something else to parse the subject or body and perform different actions based on what your blat-script sent. If another machine could step in... Or use nc.exe (netcat?) to send the command to a remote machine directly (if in a secure network only). Run your own mail server, like MailEnable (free for limited use) if getting out would be a problem, and use the remote execute ideas... There are other ideas, but knowing more about what actions are going on, what problems need attention, and how the human wants to be contacted would help. James Newton wrote: > So you have a little batch file in a win 2003 server that gets fired up on a > regular basis by the job scheduler to do something or check something and if > it runs into a problem, it needs to contact a human for help. > > Are there any good ways to do that? Here is what I can think of or find: > > - Send an email by calling a CScript .vbs file and use CDONTs to contact a > local email server and SMTP a message to someone. This is a kludge on a hack > and you better hope you have the email server set up. > > - Install a little program like blat to send the email for you. Again, make > sure you don't change the email server and forget about this script and its > (now incorrect) config. > > - Net send, but that seems to have been removed or doesn't work unless the > user has a windows messaging client running. > > - Copy a READMENOW.TXT file onto the administrators desktop and wait for him > or her to log in again? > > There has got to be a better way, no? > > > James Newton: PICList webmaster/Admin > mailto:jamesnewton@... 1-619-652-0593 phone > http://www.piclist.com/member/JMN-EFP-786 > PIC/PICList FAQ: http://www.piclist.com > > http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
RE: 2K3 batch file to send alertThe gmail server is a point I hadn't considered... Great idea... I guess I
should get with the program and get a gmail account. I have been using yahoo, but they require all sorts of security and pop before smtp garbage. Can you share your blat setup for gmail? Without your password and email included of course. -- James. -----Original Message----- From: piclist-bounces@... [mailto:piclist-bounces@...] On Behalf Of Dr Skip Sent: Monday, March 24, 2008 22:54 To: Microcontroller discussion list - Public. Subject: Re: [EE] 2K3 batch file to send alert A cmd/bat file and blat always work for me. Use gmail as the smtp server perhaps - it's always there. Write progress to a text file too, as a log. You can send to cell phone via the domains the majors have set up for email to sms. Use 2 servers to send the msg, so if you get the msg only once, one server was done or the config wrong. Redundancy. You can also have a second machine get email from a pre-assigned acct set up just for this, and use perl or something else to parse the subject or body and perform different actions based on what your blat-script sent. If another machine could step in... Or use nc.exe (netcat?) to send the command to a remote machine directly (if in a secure network only). Run your own mail server, like MailEnable (free for limited use) if getting out would be a problem, and use the remote execute ideas... There are other ideas, but knowing more about what actions are going on, what problems need attention, and how the human wants to be contacted would help. James Newton wrote: > So you have a little batch file in a win 2003 server that gets fired up on a > regular basis by the job scheduler to do something or check something and if > it runs into a problem, it needs to contact a human for help. > > Are there any good ways to do that? Here is what I can think of or find: > > - Send an email by calling a CScript .vbs file and use CDONTs to contact a > local email server and SMTP a message to someone. This is a kludge on a hack > and you better hope you have the email server set up. > > - Install a little program like blat to send the email for you. Again, make > sure you don't change the email server and forget about this script and its > (now incorrect) config. > > - Net send, but that seems to have been removed or doesn't work unless the > user has a windows messaging client running. > > - Copy a READMENOW.TXT file onto the administrators desktop and wait for him > or her to log in again? > > There has got to be a better way, no? > > > James Newton: PICList webmaster/Admin > mailto:jamesnewton@... 1-619-652-0593 phone > http://www.piclist.com/member/JMN-EFP-786 > PIC/PICList FAQ: http://www.piclist.com > > http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: 2K3 batch file to send alertJames,
I'll assume you know blat and are looking for the way to make it work with gmail... ;) I use another provider, but a quick Scroogle (scroogle.org ;) gave some good answers. The first is a program somewhat like blat but will handle the encryption. The second is a discussion about the issues and using mailsend (from link 1). The last is detailed instructions on using blat with gmail using stunnel. I would use either, but have your 'problem' run a bat file which uses > (and echo) to send time, date, and what it sees (env vars having been set, etc) to a log file at each point along the way. Very easy to debug then. There is another program -freeware- I use extensively called filenotify.exe that will trigger on a file change, write, etc in a dir (you set the parameters). I then can send an email based on a file being appended to, created, etc. For instance, on a private secure email server, it can trigger a blat email to send an sms msg to the user saying something arrived by watching the spool dir... Tell me if you need more. The 3 items are: ======================================================================================= http://www.muquit.com/muquit/software/mailsend/mailsend.html ======================================================================================== http://groups.google.com/group/Gmail-ABCs/browse_thread/thread/191506699330a069/7434d0b668b528e0?lnk=raot ======================================================================================== From http://www.freepowerboards.com/yqb/yqb-about90.html : 1. install sstunnel from <a href="http://www.stunnel.org/download/binaries.html">http://www.stunnel.org/download/binaries.html?lt;/ a> 2. Using a text editor like notepad, make a file containing what's in the text box below. Click the Select text button to highlight the text. Note: Javascript must be enabled for the button to work. Copy the information to your clipboard by right clicking on the highlighted text and selecting Copy. Paste the information into notepad. Note: Be sure that wordwrap is turned OFF. Save the file as "stunnel.conf" (including the quotes if you're using notepad) and place it in the C:\stunnel folder. Note: The quotes prevent notepad from adding .txt to the end of the filename. ---------------------------------------------------------------- client = yes [nntp] accept = 119 connect = inetnews.worldnet.att.net:563 [pop3] accept = 110 connect = ipostoffice.worldnet.att.net:995 [smtp] accept = 25 connect = smtp.gmail.com:465 -------------------------------------------------------------------- 3. blat blat 1.txt -to johnyan.ca@... -f johnyan.ca@... -server 127.0.0.1 -port 25 -u johnyan.ca -pw 123465 Blat v2.6.1 w/GSS encryption (build : Nov 18 2006 11:59:59) Sending 1.txt to johnyan.ca@... Login name is johnyan.ca@... Error: Connection to server was dropped. 4. Check your gmail. Hehe, you received a email! ================================================================================= James Newton wrote: > The gmail server is a point I hadn't considered... Great idea... I guess I > should get with the program and get a gmail account. I have been using > yahoo, but they require all sorts of security and pop before smtp garbage. > > Can you share your blat setup for gmail? Without your password and email > included of course. > > -- > James. > http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
|
|
Re: 2K3 batch file to send alertOn Tue, Mar 25, 2008 at 11:44 AM, Richard Prosser <rhprosser@...> wrote:
> > Send an SMS (text) message to a cellphone? (via your cellphone > provider, or possibly one of the "free" services that (used to ?) let > you send x free messages a day. Not sure how well it works as it > rarely worked for me (in NZ) but I know I can set it up with Vodafone > or Telecom if I'm willing to pay 20c a text. SMS seems to be especially popular in Asia (at least East Asia and Southeast Asia). Here people sent billions of SMS every year. So this seems to be quite a popular solution here. For example, a colleague just implemented a program which sends out SMS alerts (along with emails) to alert inventory issues. Here SMS is from 5c S$ (3.5c US$) down to free depending on the plan. Reference: 10 Billion SMS were sent in one week during Chinese New Year in 2006 in China. http://switch.sjsu.edu/mambo/switch22/mobile_pac_rim.html However it seems SMS is not that popular in USA. Maybe due to historical reasons. It is said that last time CDMA did not support SMS well. Xiaofan -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist |
| Free embeddable forum powered by Nabble | Forum Help |