nixCraft Linux / UNIX / Shell Scripting Forum

nixCraft

Linux / UNIX Tech Support Forum

Perl email notification

This is a discussion on Perl email notification within the Shell scripting forums, part of the Development/Scripting category; Hi there We are battling with a Perl script to send out email notifications once a certain bandwidth useage has ...


Register free or login to your account to remove all advertisements.

Go Back   nixCraft Linux / UNIX / Shell Scripting Forum > Development/Scripting > Shell scripting

Linux answers from nixCraft.


Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques

Reply

 

Thread Tools Display Modes
  #1 (permalink)  
Old 17th June 2009, 07:06 PM
Junior Member
 
Join Date: Jun 2009
OS: Debian
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Sean de Gruchy is on a distinguished road
Default Perl email notification

Hi there
We are battling with a Perl script to send out email notifications once a certain bandwidth useage has been reached. The script works, but at ever cron job it resends the email. How do I get it to only send once without a flag?
Reply With Quote
  #2 (permalink)  
Old 17th June 2009, 07:10 PM
nixcraft's Avatar
Never say die
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash, Perl, Python
Posts: 3,300
Thanks: 13
Thanked 413 Times in 306 Posts
Rep Power: 10
nixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond repute
Default

Do you use sql database to store email state? If so it is pretty easy to do. If not create a text file when email was sent first time and use the same as a flag avoid sending email notification.
__________________
Vivek Gite
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Do you run a Linux? Let's face it, you need help!
Cricket & IPL News Blog
Reply With Quote
  #3 (permalink)  
Old 17th June 2009, 07:32 PM
Junior Member
 
Join Date: Jun 2009
OS: Debian
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Sean de Gruchy is on a distinguished road
Default Sql d/base

Hi there

Thanks very much - I suggested a flag system, but they are reluctant to go that route.

We use a sql d/base to look up, and radius is on three servers using rad relay.

The flag needs to be removed once they increased their bandwidth cap.
Reply With Quote
  #4 (permalink)  
Old 17th June 2009, 08:40 PM
nixcraft's Avatar
Never say die
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash, Perl, Python
Posts: 3,300
Thanks: 13
Thanked 413 Times in 306 Posts
Rep Power: 10
nixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond repute
Default

Flag is the best option. Explains them your problem.
__________________
Vivek Gite
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Do you run a Linux? Let's face it, you need help!
Cricket & IPL News Blog
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Ubuntu Linux File Upload / Creation Email Notification cristobalaz Ubuntu / Debian 9 18th June 2009 06:34 AM
Sendind Email Using Perl chandanperl Coding in General 1 8th October 2008 12:41 PM
Email validation in Perl Code Sample chandanperl Coding in General 3 12th September 2008 04:50 PM
how to send email on every saturday in perl chandanperl Coding in General 4 22nd August 2008 06:25 PM
Mail Notification Agent sumit Mail Servers 1 25th August 2007 08:05 PM


All times are GMT +5.5. The time now is 01:28 PM.


Powered by vBulletin® Version 3.8.6 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40