Multiple timertasks--Please help

Hi
Got a problem here.
I want to poll some devices on a periodic basis.
The polling interval for each of these devices will differ.
So how do I achieve this?
If I create a Timertask for each of these devices,then I would be creating too many threads ,which will clog my system eventually if I get too many requests to poll multiple devices.
Please give me a solution as to how I should implement this functionality.
I read on the net that Using the same Timer with multiple timertasks will anyway create only a single thread..but I am not in a position to know how many timertasks I will have to create before I start off the timer..
Can anybody pleeeeeeeeease help??
Early reply will be appreciated.....
Regards

yes, TimerTask only spawns 1 thread.
Timertask will be adequate for your needs. (the best solution(in terms of performance) would be to write your own scheduler.)
rob,

Similar Messages

  • HOW TO - Create new from clipboard and process multiple files - please help

    Need help - have new version of photoshop on trial only ATM...
    Want to know - HOW TO:
    1. Create new from clipbaord
    2. Process multiple files
    Please help.

    For clipboard copy, I start with File > New and the size will be set to what's in the clipboard. Then once the new file is opened, Edit > Paste will place the clipboard contents as a layer in the new document.
    You must remember to use the command Layer > Flatten Image of you want to save as jpeg or any other file format that doesn't support layers.
    For processing multiple files,
    File > Automate > Batch or
    File > Scripts > Image Processor...
    Check the User guide or google information for those commands if you have specific needs.
    Gene

  • Need assistance searching records from multiple tables - Please Help!

    Hi, I've been trying to solve this problem for several weeks now, and I have exhausted all of my knowledge and experience.  I need help, and I hope someone here can give me some direction.
    I am using VB 2008, and the CR that comes bundled with VS 2008 Pro.  My database is a SQL Server 2005 CE v3.5 (a *.sdf file).  I am connecting to the database through a dataset, and I am displaying the report in a CrystalReportViewer.
    My dataset consistes of two tables:
    1) tblCustomers which has a primary key "CustID", and contains only customer contact and personal information. 
    2) tblDateVisited which has a primary key of "VisitID", but it also has a column titled "CustID". Basically, every time a customer visits the business, details of that visit are recorded in tblDateVisited, and that record is associated with the customer by their CustID.
    Here's what I'm trying to accomplish:  I want to be able to display only Customer records when the customer has visited and that visit matches certain criteria.  Right now, I am trying to match visits from the "tblVisitDate.PlayerType" column.  If the customer has ever had a visit where they matched a particular player type, I want to see those customer records.
    I don't know what I'm doing wrong, though.  I can search a dataset if I am only querying one table and pulling records from that table.  However, whenever I try to add a second table and perform queries on that table to get records from the first table, I can't return any records. 
    If it helps, I am trying to use one CrystalReportViewer to display multiple reports (user choice) and here's how I'm loading the report into the viewer:
    Me.tblCustomersTableAdapter.Fill(Me.dsPlayerTypeReports.tblCustomers)
    Me.tblDateVisitedTableAdapter.Fill(Me.dsPlayerTypeReports.tblDateVisited)
    Me.ReportFile.SetDataSource(dsPlayerTypeReports.Tables(1))
    I am suspicious that my problem is in the Tables(1) method.  It confuses me that I can only assign one table as a datasource when I obviously need access to two tables to make this selection work. 
    Whatever the case, I'm at the end of my rope with this one.  I'm not prone to giving up, but I'm at a dead end currently. 
    Any attempt to assist me with this will be greatly appreciated, successful or not.
    Thanks in advance!
    -Will

    No, I am connected via ADO.NET.  I don't think SQL CE can connect through ODBC (or if it can, I haven't been able to figure out how, yet).  So this isn't a stored procedure.
    When I examine the link, I can only choose an Inner Join or a Left Outer Join.  Right Outer and Full Outer are not available.  Could this be a problem with the dataset I'm using?
    Could you explain what you mean by display all of the records and then choose the selection criteria?

  • Emails disappear/vanished when using multiple devices please help!

    Please I need help, I have a long question but want to cover all possible options:
    I have several email accounts, set in different devices (all apple) that are checked continuously and simultaneously, they are all set as IMAP accounts (no conflict between IMAP vs POP) but very offen emails disapear and I am sure no one has deleted them. They literally vanish even from the server.
    I have norrowed down *I think* the problem to the following devices, my Iphone5 opens for the first time the email, and when a PowerBook with Mac OS X Version 10.7.5 opens the email at some point it vanishes, it doesnt happen with all emails but it mostlly happens with emails that contain attachments after I have viewed the attachements in my Iphone.
    I am a die hard Apple fan and I have looked the other way for over a year but I need this to stop, it is actually costing me money now and I have done lots of research but cant find the solution.
    My phone carrier is Verizon if this is relevant.
    Any help would be greatly appresiated! thanks!

    Are you using iCloud top sync mail between devices ??

  • Adobe downloaded to multiple drives please help Thanks

    I purchased adobe web premium a couple of months ago. When I downloaded this program and I did a custom install to go onto another drive. With my computer I have several hard drives with multiple drives on them. I wanted this to go all onto my G drive but for some reason it downloaded alot of stuff to my C drive. My C drive is really full so I did not want any of this program on there. My question is this Can I take all of the stuff on the C drive and move it to my G drive with out messing up the program. I am talking brushes, Plugins things of this nature. I don't want it to look in the registry of the C drive but the G drive. This way it saves alot of space on my C. I have windows vista Ultimate. Can someone help me figure this out? Thanks

    ladytaralynn wrote:
    My C drive is really full so I did not want any of this program on there.
    That is normal behavior. Shared components such as Bridge, PDFL, Fonts etc. will always be installed on your system drive.
    ladytaralynn wrote:
    My question is this Can I take all of the stuff on the C drive and move it to my G drive with out messing up the program. I am talking brushes, Plugins things of this nature.
    Most likely not. Some plug-ins will always have to be loaded within the context of your system root directory since they need to obbey a specific loading order and call up other files. Likewise, any content or extension will not show up in the fly-out menus, if not in the reserved directories. E.g. if you move your brushes to a different drive, the program cannot scan them on startup and they will not be listed in the menu. You will have to load them manually, which simply may become impractical. The only thing I can think of, is to create a link to the folder and place it inside the program directory, but this does not work for all Adobe programs. So more or less, you should really leave things as they are and instead get a bigger drive one of those days. Deactivate your apps, create a disk image, apply the image to the new drive, reactivate everything... Should do the trick without having to fully re-install.
    Mylenium

  • Breaking huge text into multiple parts.Please help..

    Hi all..i'm urgently need any attention here..pliz help to solve this problem..
    The description of my problem is like dis >> let say now i have 100 length of a text. Now , i need to break it into multiple parts, accordingly to the max lenght of a part for one time is 30.So, it should be to returned like dis >>
    text [1]="blablabla.." -->text.length =30
    text [2]="blablabla.." -->text.length =30
    text [3]="blablabla.." -->text.length =30
    text [4]="blablabla.." -->text.length =10
    I have write a pieces of code that may explain what i try to do..but its not really work..i hope anybody out there can help me..thanks a lot..
    code:
              for (int i=0; i<fullMsg.length(); i++){
                   singlLen ++;
              if (singlLen == LEN-1){
                        System.out.print("splitMsg: i="+i+"\n");
                        System.out.print("splitting new msg["+msgCnt+"]="+fullMsg.substring(beginPos, i)+"\n");
                        msg[msgCnt] = fullMsg.substring(beginPos, i);
                        singlLen = 0;
                        msgCnt ++;
                        beginPos = i+1;
                   }

         public static void main(String[] args) {
              String LONG = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
              int MAX_LEN = 30;
              ArrayList<String> strList = new ArrayList<String>();
              int i = 0;
              while (i < Math.floor(LONG.length() / MAX_LEN)) {
                   strList.add(LONG.substring(i * MAX_LEN, MAX_LEN * (i + 1)));
                   i++;
              // now get the remainder
              i--; // decrement it to get how many MAX_LEN chunks we have
              int remainder = LONG.length() % MAX_LEN;
              strList.add(LONG.substring(MAX_LEN * (i + 1), MAX_LEN * (i + 1)
                        + remainder));
              System.err.println(strList.toString());
         }I'm not sure if this is what you want... Say you have 75 chars in string.
    Prepares an array with 3 strings,
    first len 30,
    second len 30,
    last len 15
    makes 75 in total

  • Data repeats in multiple instances, please help.

    Hi,
    I have been working for days on this form using Adobe Livecycle 9 ES2 and need some help.  I am new to LiveCycle and JavaScript, but as you'll see, I've learned a lot .
    I have a repeatable subform (GoalSheet) that totals values based on a dropdown:
    var len = form1.GoalSheet.Table6._Others.count;
    var sum = 0.0;
    this.rawValue=0;
    if (form1.GoalSheet.Table6.First.Funding1.rawValue==1)
    sum += form1.GoalSheet.Table6.First.Cost.rawValue;
    for (var i = 0; i < len; i++){
    if (form1.GoalSheet.Table6.resolveNode("Others[" + i + "]").fsource.rawValue==1) {
    sum += form1.GoalSheet.Table6.resolveNode("Others[" + i + "]").Cost2.rawValue;
    this.rawValue = sum;
    This works beautifully.  However, when the user creates a second instance of GoalSheet, it doesn't work. 
    Any suggestions?
    A link to the form is here:  https://www.dropbox.com/s/94t48cw2ywcxpcq/4-20%20Draft_total_formcalc_pagination_safetynet %20v126.pdf
    Thanks for any and all help!
    Michael

    Thank you so much for your reply.  You are putting me on the right track.
    However, in my original code I have two if statements, one to sum the First row and one to sum the Others row.  Would you mind incorporating that in your explanation?  I am having trouble picturing how that looks.
    I appreciate your time.
    Michael
    form1.GoalSheet.PracticeTitle1::calculate - (JavaScript, client)
    var len = form1.GoalSheet.Table6._Others.count;
    var sum = 0.0;
    if (form1.GoalSheet.Table6.First.Funding1.rawValue==1)
              sum += form1.GoalSheet.Table6.First.Cost.rawValue;
    for (var i = 0; i < len; i++){
    if (form1.GoalSheet.Table6.resolveNode("Others[" + i + "]").fsource.rawValue==1) {
                                  sum += form1.GoalSheet.Table6.resolveNode("Others[" + i + "]").Cost2.rawValue;
    this.rawValue = sum;

  • BT Cloud Multiple Problem Please Help

    Activated BT Cloud and received an email saying I have 2GB allowance.  As an Infinity 2 customer I thought it was 50GB?
    The Mac client is refusing to do anything.  Backup Paused. The only messages seem to suggest I have 0 bytes used and 0 bytes available.
    The Web client just spins a wheel in the middle of the screen.  I have tried Safari and Opera.
    The Iphone client says Could not login.  Could not find the file.  Please try again.  I am sure my BT ID (not my email) is correct as I can access my account on the BT website.
    Are all these problems related or am I just unlucky
    Thank you in advance, Stephen.
    Solved!
    Go to Solution.

    Hi Stephen,
    Thanks for posting. I think we need to look into this for you. Drop me an email with the details. You'll find the "contact us" form in the about me section of my profile. Once I have the details we'll take it from there.
    Cheers
    David
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Network and multiple screens - please help

    As a designer I've always used two screens running from one mac to spread around my open information boxes.
    Just received a new g5 with Snow Leopard but only have one monitor socket.
    The mac is networked vie ethernet cable to the internet and other macs and pcs in the office
    Many years ago I had two macs connected to a direct ethernet cable (no router) and was able to share the screens by nudging the mouse pointer off one screen and onto the other mac.
    Whats the terminology for this type of network?
    Is it possible for me to keep the new G5 on its ethernet network to access printers, pc, internet,.. and also connect to the other mac using this mouse push through screen sharing feature.
    Thanks
    Ed

    Hi
    Just to clarify: there's no such thing as a G5 any more. The model I think you mean would be a MacPro. If you look at the back of the Graphics Card you should see at least one Mini Display Port. This will allow you to connect a second monitor. Some MacPros come with two allowing 3 Monitors. This link will explain it more:
    http://store.apple.com/us/browse/home/shopmac/family/macpro?mco=MTg5MTY5NDQ
    Look at the graphic in the bottom right hand corner. To get this to work you will need one of these:
    http://store.apple.com/us/product/MB572Z/A
    Or depending which Monitor you have, one of these:
    http://store.apple.com/us/product/MB570Z/A
    Many years ago I had two macs connected to a direct ethernet cable (no router) and was able to share the screens by nudging the mouse pointer off one screen and onto the other mac. Whats the terminology for this type of network?
    Remote Management or ARD - Apple Remote Desktop. It's built-into every mac.
    Is it possible for me to keep the new G5 on its ethernet network to access printers, pc, internet,.. and also connect to the other mac using this mouse push through screen sharing feature?
    Yes.
    Tony

  • Cant Install Itunes to Windows 7 (Multiple Errors) Please help

    so i keep trying to install itunes and i get these errors:

    Even though the micorsoft website does not list hte SUBINACL tool as being a valid tool for WIndows 7, here is a thread where a microsoft support person recommends it.
    http://social.answers.microsoft.com/Forums/en-US/w7programs/thread/324918a2-fb68 -49ba-833f-ecfb15a7ef10
    I would definitely follow the advice of backing up the registry and creating a restore point before proceeding with subinacl.
    After you have downloaded subinacl and installed using admin rights, do these steps to reset the registy permissions:
    ~Start Notepad.
    ~Copy and then paste the following text into Notepad.
    cd /d "%ProgramFiles%\Windows Resource Kits\Tools"
    subinacl /subkeyreg HKEYLOCALMACHINE /grant=administrators=f /grant=system=f
    subinacl /subkeyreg HKEYCURRENTUSER /grant=administrators=f /grant=system=f
    subinacl /subkeyreg HKEYCLASSESROOT /grant=administrators=f /grant=system=f
    subinacl /subdirectories %SystemDrive% /grant=administrators=f /grant=system=f
    subinacl /subdirectories %windir%\. /grant=administrators=f /grant=system=f
    secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose
    ~Save this Notepad file as Reset.cmd.
    ~Double-click the Reset.cmd file to run the script.
    Note This script file may take a long time to run. You must run this script as an administrator.

  • Lr5 Multiple questions- Please help

    I recently upgraded from Lr4 to Lr5. 
    In my APPLICATIONS, I have Lr4 and Lr5 both taking up 1GB of space.  Is it neccessary to have both of these applications.
    In my PICTURES, I have a lightroom folder that contains-
    Lr4 views.lrdata
    Lr4 Catalog.lrcat
    Lr4 Catalog.lrcat.lock
    Lr5 views.lrdata
    Lr5 Catalog.lrcat
    Another Lightroom folder in pictures which contains-
    2013-2Previews.lrdata
    2013-2.lrcat
    2013.lrcat
    Backups folder which contains-> folder 2013-01-18 contains -> 2013.lrcat and a folder 201309-05 which contains -> 2013.lrcat
    -Are these ALL necessary? 
    -I keep my Lightroom on an external HD should my catalog, Previews and lrdata also be on my Ext HD? 
    -If I use muliple Ext HD will I be able to have the catalog, Previews and lrdata on each to open files?
    I just tried to open my LR and it asked me to upgrade from 4 to 5 haven't I already done this?
    What can I delete and what should I keep? 
    Thank you in advance for your time and patience.

    You have to identify which catalog is which. I imagine you would do this by opening them (double-click on them) and seeing what is in them. Then, the ones you don't want can be deleted or archived. So probably, they're not all necessary, but since I don't know what's in your catalogs, don't go by my word.
    I keep my Lightroom on an external HD should my catalog, Previews and lrdata also be on my Ext HD?
    Not sure what you are referring to with "keep my Lightroom...", there's the program itself, the photos, and the catalog file and previews. The program itself is almost always stored on the system drive (which for Windows is the C:\ drive), although I suppose you could put it elsewhere. The photos and catalog file can be on any disk you want them to be, as long as the catalog file isn't on a networked drive.
    If I use muliple Ext HD will I be able to have the catalog, Previews and lrdata on each to open files?
    One catalog works, regardless of the number of disks that the photos are on
    I just tried to open my LR and it asked me to upgrade from 4 to 5 haven't I already done this?
    Well, maybe you did and maybe you didn't. As I can't see what is in your catalogs taht are being opened, I don't know. You have to look and see if this is a catalog that was previously converted, or a catalog that was NOT previously converted. I think you'd want a single LR5 catalog — maybe you have that already and just haven't communicated it clearly.

  • Multiple problems, please help, I am freaking out.

    Hey, so I've been waiting to get  new ipod since the day the 5th gen was released. So yesterday, I go and I buy a brand new, in box, slate 5th gen off of craigslist. Problem is, I have no reciept, but it is still under warranty.
    Now, for the devastating event that took place today:
    So, while using the loop and taking a picture, the ipod slipped out of my hand. Luckily, the loop saved its life! Until it fell.  The ipod on the ground, face down, with the loop sliding down my arm. The loop had slipped off of the button.
    Now, there is a tiny little crack in the top right corner of my screen, and I am horrified to ever use the loop again. The crack does not get in my way too much, but it is just extremely upsetting since I bought it brand new, last night. 
    Would this be considered a defect, since the loop that came with the ipod, from apple, failed to work to its design? Or is it possible that there is a defect in the loop button? I have an appointment at the genius bar tomorrow, is it even worth going?

    I di not understand that happened. I would make an appointment at the Genus Bar of an Apple store and make your case..            
    Apple Retail Store - Genius Bar

  • How do I create a new Apple ID every time I try apple says that the email has been used please help me!!

    How do I create a new Apple ID every time I try apple says I can't because that email has been taken I've done it multiple times please help me

    An email address can only be associated with one Apple ID at a time. You will have to remove it from the other ID or use a different email address.
    http://www.apple.com/support/appleid/

  • Managing multiple sites in different iWeb versions - PLEASE HELP!

    apnewbie/cyclosaurus/roddy/old toad (and any others more knowledgeable than i):
    i've run into a bit of a pickle. i am hoping someone can help straighten me out. i am about to jump out of a window. here's the rundown:
    (for starters, i have a .mac account and am publishing to .mac.) i created a site in iWeb 1.1.2 on my work computer (mac book pro). worked great, really lovely. thought to myself, "hey, i'd like to create another site from home, but i don't have iWeb at home (powerbook G4) - i should buy iLife 08 so i can build these things from home and not have personal files on my work computer."
    so: i had a site that i created within 1.1.2 with files written to iDisk. i purchased iWeb 08 and would like to have another site, but this one is being created in 2.0. i also am using a personal domain name this time around bought with google apps and hosted by godaddy. i published the new work in progress for a test run and...you guessed it...my original 1.1.2 site was rewritten by the 2.0 site. and the 2.0 site comes up as the standard google search page for domains that aren't up and running. whooopsie.
    sorry for the lengthy intro, but that's the background. i guess my specific questions are:
    1) i want to be able to maintain multiple sites from iWeb 2.0...can i open my 1.1.2 domain file in 2.0 and successfully bring that site into 2.0?
    2) what is the most efficient and easiest way to get both of these sites running in 2.0? right now i have two domain files (created on two different computers).
    3) for domain management, is it best to move from the iWeb folder in my home library to different folders (one for each site, with separate domain files, and my 2.0 domain file is NOT called domain, it's the name of the site) to another location? (and of course, i will back these up just in case.) and when i want to update a site, i just open that individual domain file, right? or will these sites publish over each other?
    please help. i am at my wits end. i'm sure this is a relatviely simple issue, but i'm new to iWeb.
    thanks, thanks, thanks for your help guys.
    joojy

    joojy,
    Welcome to the forums!
    First of all, your original 1.1.2 site may not, in fact, have been overwritten. It is quite possible that the site remains in it's position on the iDisk, Web/Sites/iWeb/YourSite, but because you published to the iDisk (.Mac) from 2.0, a different index.html file has been placed in the root level Web directory which is causing the 404 error. Navigate to the directory on the iDisk, using the Go menu in Finder, and look to see what is actually there. Follow this path:
    Go/iDisk/My iDisk/Web/Sites/iWeb/YourSiteWillBeHereIfYourLuckIsGood
    If your site is there, great; if it isn't, it's not really a problem because hopefully you still have the Domain.sites file on the MacBook Pro and you can republish it if necessary. If it is there, you can modify the index.html file on the iDisk using a text editor and get your url redirected back to where it should be.
    Second, do not open your 1.1.2 Domain.sites file with 2.0 until you have a backup of this Domain file. External drives are best for this. Assuming the backup is in place, launch 2.0, choose the Domain.sites file, and click on "update". It will be updated to a Domain.sites2 file. If the site looks ok then continue on with editing/publishing.
    Skipping to question (3), by all means, abandon the default location of the Domain.sites file in the Home folder's Library and get accustomed to keeping your Domain files in their own, respective folders. When you want to open one just double-click it.
    You are going to encounter difficulties publishing multiple sites in 2.0.2, unless you keep all of the sites in a single Domain file. 2.0 is publishing to a different directory on the iDisk than 1.0; it publishes to /Web/Sites/, as opposed to /Web/Sites/iWeb/. Publishing a site from a separate Domain file erases previously published sites. I have been able to publish multiple sites, from multiple Domain.sites2 files, by mounting the iDisk and actually moving the Site folder back one level, into the root Web folder, and then publishing. When finished, I move it back again. If you have RSS feeds you will probably get a 'file in use' error. The alternative, (other than keeping all sites in a single Domain), is to publish the site to a folder and then manually drop the Site folder into the Web/Sites/ directory on the iDisk. Of course, some .Mac functions are lost when publishing this way.
    Work through this info and post back.
    -Mark

  • My touch screen isn't working and stopped working after I went running with it. I have restarted it multiple times and restored it on my MacBook. It will still not let me slide it to even look at the phone. Please help ASAP.

    I took my iPhone running today and when I returned I was not able to slide it open or type in my pass code. All buttons are still responding. I have tried restarting it multiple times and even restored it, but the touch screen will not respond to anything. I also cleaned the screen off with a damp cloth. Please help! I WAS able to slide it open in the middle of restoring it but not able to click on any apps. Help! My life is on my iPhone and I am a nurse on call!

    Try restore as new using computer iTunes.

Maybe you are looking for

  • How do I use the Profile Manager to run multiple PHP sessions?

    I have a website that tracks the session and state of users as they traverse through the site. Several users can "work together" simultaneously. To test this cooperative functionality, I ran multiple Firefox profiles simultaneously on my computer, us

  • What's wrong with my AppletContext.showDocument?

    ive been having a hard time figuring out my problem and i think its time to let this problem out to the world. im trying to call a certain html file to be shown on a certain frame of another html file, after a Java-made button is clicked. to clear th

  • How can I make .jar files for applications?

    My jar program creates jar files but won't open the program when I double click them. I use the command: jar cvf *.jar filenames The jar file is created but won't execute. Can anyone tell me what i am doing wrong? Thanks Jiby

  • Photoshop won't print offending command

    photshop cs5.1 won't print. when printing 8.5 x 11 it prints a 12 x 18 sheet all white except type which says offending command

  • Spry not working properly in IE (what a surprise!)

    Hi all, I have create a menu bar using spry. Problem is the drop down lists appear to the far left in IE and not underneath each dropdown link. An example can be found here http://www.thesketchcollective.co.uk/spry-test.php I've tested in IE8, 7 and