It is currently Thu Apr 24, 2014 12:50 am




Post new topic Reply to topic  [ 2 posts ] 
 How to email a table using a timer? 
Author Message
Cadet
Cadet

Joined: Thu Aug 25, 2011 11:22 pm
Posts: 9
Post How to email a table using a timer?
I have a timer and a table called MIS. I want this MIS to be sent through email exactly at 10 a.m. everyday. Please tell me how to do this using a timer and what scripting can be used?


Wed May 30, 2012 4:40 am
Profile
Moderator
Moderator

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 4016
Location: Sacramento, CA
Post Re: How to email a table using a timer?
Well, you really need to break the problem down into steps and attack it one piece at a time.

Here are some tips to get you started.

1. Create a button that emails the table.

First you'll need a script that emails the table's contents. Take a look at the system.net.sendEmail function.

2. Write a property change script for the time that checks the time. You're looking for when it's 10am, obviously. There are a variety of ways to do this, but the easiest would be to simply create a new Date object like so:
Code:
from java.util import Date
now = Date()
and then use the system.db.dateFormat function to pull out the time component.

3. Put it all together. Figure out how you're going to make sure that this client with your table/timer window is running all the time, and exactly 1 copy is running.

_________________
Carl Gould
Software Development
Inductive Automation


Tue Jun 05, 2012 3:36 pm
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


Who is online

Users browsing this forum: No registered users and 3 guests


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 post attachments in this forum

Search for:
Jump to: