This window service has timer for update record once in a day at 5 pm.

Hi Guys Please help me.
Actully i create a window service. This window service has timer for update record once in a day at 5 pm.
I have write a code but it is not working fin
Here is my code.
App.Config File:-
<appSettings>  
    <add key="IsTrace" value="YES"/>
    <add key="SourceServerPath" value="Server=DATASERVER\SQL2008R2;database=WDSBHN;User ID=Wireless;pwd=chetu@123"/>
    <add key="ArchiveServerPath" value="Server=CHETUIWK091\SQL2008R2;database=Demo;User ID=sa;pwd=Chetu@123"/>
    <add key="ReportHour" value="22"/>
    <add key="ReportMinut" value="01"/>
    <add key="ReportSecond" value="20"/>
    <add key="ReportMilisecond" value="230"/>
    <add key="DailyTimer" value="tmrProductionDataTransfer"/>
    <add key="MonthlyTimer" value="tmrProductionCleanUp"/>
    <add key="ActionParameter" value="WDS-DataTransfer"/>
  </appSettings>   
Vb.Net Code:-
Protected Overrides Sub OnStart(ByVal args() As String)
        ' Add code here to start your service. This method should set things
        ' in motion so your service can do its work.
        Try
            LoggingTracing.WriteTrace("DataTransfer Service START " & Now.ToLongDateString & " " & Now.ToLongTimeString())
            '***Get the Time of service run
            Dim svcRunTime As System.DateTime = Configuration.ConfigurationManager.AppSettings("ServiceRunTime")
            '***differance of these two time
            Dim ts As TimeSpan = DateTime.Now.Subtract(svcRunTime)
            '***production data transfer
            tmrProductionDataTransfer.Enabled = True
            tmrProductionDataTransfer.Interval = 1000
            tmrProductionDataTransfer.Start()
        Catch ex As Exception
            LoggingTracing.WriteError(ex.ToString())
        End Try
    End Sub
Private Sub tmrProductionDataTransfer_Elapsed(sender As Object, e As Timers.ElapsedEventArgs) Handles tmrProductionDataTransfer.Elapsed
        Try
            Dim time As Date = Date.Now
            Dim currHour As Integer
            Dim currMinute As Integer
            Dim currnSecond As Integer
            Dim reportHour As Integer
            Dim reportMinute As Integer
            Dim reportSecond As Integer
            Dim reportMiliSecond As Integer
            Dim actionParameter As String = Configuration.ConfigurationManager.AppSettings("ActionParameter")
            Dim actionTimerName As String = Configuration.ConfigurationManager.AppSettings("DailyTimer")
            currHour = time.Hour
            currMinute = time.Minute
            currnSecond = time.Second
            reportHour = Convert.ToInt32(Configuration.ConfigurationManager.AppSettings("ReportHour"))
            reportMinute = Convert.ToInt32(Configuration.ConfigurationManager.AppSettings("ReportMinut"))
            reportSecond = Convert.ToInt32(Configuration.ConfigurationManager.AppSettings("ReportSecond"))
            reportMiliSecond = Convert.ToInt32(Configuration.ConfigurationManager.AppSettings("ReportMilisecond"))
            If currHour = reportHour AndAlso currMinute = reportMinute AndAlso currnSecond = reportSecond Then
                ObjProductionDataTransfer.CopyDataToArchiveServerDayWiseDL(Configuration.ConfigurationManager.AppSettings("SourceServerPath"), Configuration.ConfigurationManager.AppSettings("ArchiveServerPath"),
actionTimerName, time, actionParameter)
            End If
        Catch ex As Exception
            LoggingTracing.WriteError(ex.ToString())
        End Try
    End Sub
It is running at 5 pm , but run 3 times, for that records has updated 3 time 
How i can resolve it, If any problem in this code please give me the write direction or code. And this thing i have been searching for 3 days , but stile i didn't get any solution
sonesh

Sonesh,
Sorry but you have posted to a forum that deals exclusively with questions/issues about customizing and programming Microsoft Project, a planning and scheduling application. I suggest you delete this post and find a more appropriate forum.
John

Similar Messages

  • Window service Timers.Timer

    Hi Guys Please help me.
    Actully i create a window service. This window service has timer for update record once in a day at 5 pm.
    I have write a code but it is not working fin
    Here is my code.
    App.Config File:-
    <appSettings>  
        <add key="IsTrace" value="YES"/>
        <add key="SourceServerPath" value="Server=DATASERVER\SQL2008R2;database=WDSBHN;User ID=Wireless;pwd=chetu@123"/>
        <add key="ArchiveServerPath" value="Server=CHETUIWK091\SQL2008R2;database=Demo;User ID=sa;pwd=Chetu@123"/>
        <add key="ReportHour" value="22"/>
        <add key="ReportMinut" value="01"/>
        <add key="ReportSecond" value="20"/>
        <add key="ReportMilisecond" value="230"/>
        <add key="DailyTimer" value="tmrProductionDataTransfer"/>
        <add key="MonthlyTimer" value="tmrProductionCleanUp"/>
        <add key="ActionParameter" value="WDS-DataTransfer"/>
      </appSettings>   
    Vb.Net Code:-
    Protected Overrides Sub OnStart(ByVal args() As String)
            ' Add code here to start your service. This method should set things
            ' in motion so your service can do its work.
            Try
                LoggingTracing.WriteTrace("DataTransfer Service START " & Now.ToLongDateString & " " & Now.ToLongTimeString())
                '***Get the Time of service run
                Dim svcRunTime As System.DateTime = Configuration.ConfigurationManager.AppSettings("ServiceRunTime")
                '***differance of these two time
                Dim ts As TimeSpan = DateTime.Now.Subtract(svcRunTime)
                '***production data transfer
                tmrProductionDataTransfer.Enabled = True
                tmrProductionDataTransfer.Interval = 1000
                tmrProductionDataTransfer.Start()
            Catch ex As Exception
                LoggingTracing.WriteError(ex.ToString())
            End Try
        End Sub
    Private Sub tmrProductionDataTransfer_Elapsed(sender As Object, e As Timers.ElapsedEventArgs) Handles tmrProductionDataTransfer.Elapsed
            Try
                Dim time As Date = Date.Now
                Dim currHour As Integer
                Dim currMinute As Integer
                Dim currnSecond As Integer
                Dim reportHour As Integer
                Dim reportMinute As Integer
                Dim reportSecond As Integer
                Dim reportMiliSecond As Integer
                Dim actionParameter As String = Configuration.ConfigurationManager.AppSettings("ActionParameter")
                Dim actionTimerName As String = Configuration.ConfigurationManager.AppSettings("DailyTimer")
                currHour = time.Hour
                currMinute = time.Minute
                currnSecond = time.Second
                reportHour = Convert.ToInt32(Configuration.ConfigurationManager.AppSettings("ReportHour"))
                reportMinute = Convert.ToInt32(Configuration.ConfigurationManager.AppSettings("ReportMinut"))
                reportSecond = Convert.ToInt32(Configuration.ConfigurationManager.AppSettings("ReportSecond"))
                reportMiliSecond = Convert.ToInt32(Configuration.ConfigurationManager.AppSettings("ReportMilisecond"))
                If currHour = reportHour AndAlso currMinute = reportMinute AndAlso currnSecond = reportSecond Then
                    ObjProductionDataTransfer.CopyDataToArchiveServerDayWiseDL(Configuration.ConfigurationManager.AppSettings("SourceServerPath"), Configuration.ConfigurationManager.AppSettings("ArchiveServerPath"),
    actionTimerName, time, actionParameter)
                End If
            Catch ex As Exception
                LoggingTracing.WriteError(ex.ToString())
            End Try
        End Sub
    It is running at 5 pm , but run 3 times, for that records has updated 3 time 
    How i can resolve it, If any problem in this code please give me the write direction or code. And this thing i have been searching for 3 days , but stile i didn't get any solution
    sonesh

    Sonesh,
    Sorry but you have posted to a forum that deals exclusively with questions/issues about customizing and programming Microsoft Project, a planning and scheduling application. I suggest you delete this post and find a forum appropriate for your issue.
    John

  • I keep getting a popup that says"host process for window services has stopped"

    hp s5220f
    microsoft windows 7 home premium edeition (64 bit)
    I keep getting a popup window that says "host process for window services has stopped"
    How can I get rid of this?

    Hello tribefanz,
    Sounds like a compatiblity issue with a program and Windows 7. We need to find out what program is causing the issue though. We can do that through event viewer
    1. Click the start orb
    2. Select Control Panel
    3. System and Security
    4. Under Administrative Tools select the Event Viewer
    In the event viewer you will want to drill down into the Application and System logs and look for anything with a Red X that says Error. Identify the program causing the problem and then we can go from there.
    If I have helped you in any way click the Kudos button to say Thanks.
    The community works together, click Accept as Solution on the post that solves your issue for other members of the community to benefit from the solution.
    - Friendship is magical.

  • Can I plot 2 locations at the same time for each record in a table

    I'm trying to plot 2 Locations (2 points on a Power View Map) at the same time for each record/project in a table
    I can plot 1 location for each project of course with no problem
    but I'm trying to show the Begin Point and the
    End Point for each project at the same time
    Is this even possible?

    First of all THANKS this worked!
    But now I stumbled on another issue. So I actually have 3 tables (and I've adopted them to the file you sent)
    Table 1 => TripData
    Trip
    LongLat
    Location
    Type
    TypeCode
    Size
    NW Tour
    47.568077, -122.320800
    Seattle, WA
    Begin
    0
    1
    NW Tour
    47.035608,   -122.884812
    Olympia,   WA
    End
    1
    1
    Cali Trip
    37.808848, -122.412580
    San Francisco, CA
    Begin
    0
    1
    Cali Trip
    32.682611, -117.178348
    San Diego, CA
    End
    1
    1
    Table 2 =>
    TripInfo
    Trip
    OneLongLat
    NTP
    NW Tour
    47.568077, -122.320800
    1/1/2015
    Cali Trip
    37.808848, -122.412580
    1/5/2015
    Table 3 =>
    ALLTrips
    Trip
    Stop
    Owner
    NW Tour
    1
    Owner1
    NW Tour
    2
    Owner2
    NW Tour
    3
    Owner3
    NW Tour
    4
    Owner4
    NW Tour
    5
    Owner5
    Cali Trip
    1
    Owner6
    Cali Trip
    2
    Owner7
    Cali Trip
    3
    Owner8
    Cali Trip
    4
    Owner9
    Cali Trip
    5
    Owner10
    Cali Trip
    6
    Owner11
    This is how the Diagram View looks like in PowerPivot
    Trip Data => Trip Info <= ALLTrips
    Since I don't know how to post pictures
    The MAP FIELDS are as follows
    SIZE - Count of Stop(s)
    LOCATIONS - OneLongLat followed by
    LongLat (drill down feature)
    COLOR - Trip
    The problem now happens with the drill down feature
    You can either plot OneLongLat which is the general location for each trip
    Or LongLat of each trip which shows the begin and end points
    But you can't use the drill down feature???
    If instead of OneLongLat you use a
    State Column it actually works!!!
    I wonder if it has to do with the fact that both locations used for the drill down are Long/Lat numbers???
    Any suggestions???
    And again Thanks for the response!

  • HT1923 iTunes on my Windows Vista has failed to update over several weeks. Attempting uninstal/reinstall according to iTunes support page. Will not uninstall 'Apple Mobile Device Support' - goes to 99% then progress bar unwinds completely. Tried rebooting

    iTunes on my Windows Vista has failed to update over several weeks. Audio will not play out. Attempting uninstal/reinstall according to iTunes support page. Will not uninstall 'Apple Mobile Device Support' - goes to 99% then progress bar unwinds completely. Tried rebooting. Any clues??

    Hey petanque1,
    Thanks for the question. I understand that you are experiencing issues installing iTunes for Windows. The following article outlines the error message you are receiving and a potential resolution:
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/TS5376
    Some Windows customers may experience installation issues while trying to install or open iTunes 11.1.4.
    Symptoms may include:
    "The program can't start because MSVCR80.dll is missing from your computer"
    "iTunes was not installed correctly. Please reinstall iTunes. Error 7 (Windows Error 126)”
    "Runtime Error: R6034 - An application has made an attempt to load the C runtime library incorrectly"
    "Entry point not found: videoTracks@QTMovie@@QBE?AV?$Vector@V?$RefPtr@VQTTrack@@@***@@$0A@VCrashOnOverf low@@***@@XZ could not be located in the dynamic link library C:\Program Files(x86)\Common Files\Apple\Apple Application Support\WebKit.dll”
    Resolution
    Follow these steps to resolve the issue:
    Check for .dll files
    1. Go to C:\Program Files (x86)\iTunes and C:\Program Files\iTunes and look for .dll files.
    2. If you find QTMovie.DLL, or any other .dll files, move them to the desktop.
    3. Reboot your computer.
    Note: Depending on your operating system, you may only have one of the listed paths.
    Uninstall and reinstall iTunes
    1. Uninstall iTunes and all of its related components.
    2. Reboot your computer. If you can't uninstall a piece of Apple software, try using theMicrosoft Program Install and Uninstall Utility.
    3. Re-download and reinstall iTunes 11.1.4.
    Thanks,
    Matt M.

  • After Updating Adobe Indesign CC ,While I'm selecting text in a paragraph, the text disappears and this problem repeated several times before update everything was ok

    After Updating Adobe Indesign CC ,While I'm selecting text in a paragraph, the text disappears and this problem repeated several times before update everything was ok

    First, see Replace Your Preferences and do it for the original account.
    If that fails to solve the problem, rename the two Adobe folders that contain the prefs in the user profile for that account and copy the folders from the new account where it works. You want to be sure you copy the folders, rather than merge the contents, so you must rename the old folders first.

  • Generating Wizard layout for updating record

    Is there a way of using JHeadstart to generate a wizard to be used for updating records (and not for inserting) ?
    I want to be able to use a table-form layout, but have the update of the record via the form to be presented in a wizard layout.
    Cheers,
    Brent

    Brent,
    Yes, JHeadstart can also be used for generating a wizard to do updates. See the "Attention" at the end of section 5.8 in the JHeadstart 10.1.3.2 Developer's Guide (http://download.oracle.com/consulting/jhsdevguide1013.pdf).
    Hope this helps,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • I have mac osx 10.6.8 and I keep getting update notices that do nothing, just search for update server. Happens every day. What can you or I do to fix this?

    I have mac osx 10.6.8 and I keep getting update notices that do nothing, just search for update server. Happens every day. What can you or I do to fix this? Other people I work with and use macs have the same issue.

    If you have problems with updating or with the permissions then easiest is to download the full version and trash the currently installed version to do a clean install of the new version.
    Download a new copy of the Firefox program and save the DMG file to the desktop
    * Firefox 6.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Trash the current Firefox application to do a clean (re-)install
    * Install the new version that you have downloaded
    Your profile data is stored elsewhere in the Firefox Profile Folder, so you won't lose your bookmarks and other personal data.
    * http://kb.mozillazine.org/Profile_folder_-_Firefox

  • Remote Desktop Client Update 3.8.2 v.11 remains in Software Update queue but, is listed (several times) under "Updates Installed in Last 30 Days.

    Remote Desktop Client Update 3.8.2 v.11 remains in Software Update queue but, is listed (several times) under "Updates Installed in Last 30 Days". This is also the case with HP Printer Software update 3.0 and Digital Camera RAW Compatibility Update 6.03. Clicking the "update" button for these doesn't appear to install the software, but lists it in the "Updates Installed in Last 30 Days" without removing it from the Software Update queue.

    Thank you. I tried that and even gave it a few days to do its thing, but I still get the same results. Remote Desktop, HP Printer, Digital Camera all still appear in "Available Updates", but the same versions appear under "Updates Installed in the Last 30 Days". BTW, I had to manually install the Safari 8.0.4 update because it also wasn't updating.

  • Google safe browsing service is unavailable, no updates have occurred in 5 days

    this message appears on safary/prefferences/security/under fraudulent sites
    google safe browsing service is unavailable, no updates have occurred in 5 days??
    help please!

    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Security
    and uncheck the box marked
    Warn when visiting a fraudulent website
    Then check the box again. Wait a minute or so and test.

  • Recording a last updated time for each record in a table

    hi
    i have a table with 5 columns. and the table has 100 rows of data.
    i need to add a sixth column and this column should contain the last updated time of that particular row.
    i am allowed to use triggers.
    for example, if the 55th row undergoes a change, the 6th column's value for the 55th row should update itself with that particular time.
    can any one of you come up with an optimized solution for this please ???
    thanx a million in advance and best regards,
    novice DBA
    :)

    Hi,
    Here's an example:
    CREATE OR REPLACE TRIGGER table_x_biu
    BEFORE INSERT OR UPDATE ON table_x
    FOR EACH ROW
    BEGIN
         :NEW.modified_dt := SYSDATE;
    END     table_x_biu
    SHOW ERRORSwhere table_x is your table name, and modified_dt is the DATE column to be populated.
    You won't have to specify modified_dt in any INSERT or UPDATE statements. In fact, if you do, the value you give will be ignored, and the trigger will always substitute SYSDATE.
    WARNING: if you do get an error message, the line number reported will usually be relative to the first DECLARE or BEGIN statement in the trigger. For example, if I had mis-spelled SYSDATE in the example above, the error message would say there was a problem in line 2, not line 5.

  • Host process for windows services has stopped working in windows server 2008

    hi ..
    i can access to server from any where by remote desktop
    the problem is if you want access the error in client is can not connect to user profile and in server the error is (failed to connect to windows service
    windows could not connect to user profile service service .. )

    This one may help.
    You receive a "The User Profile Service failed the logon” error message
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Adpatch 9239089 taking time for Updating Snapshot Tables

    Hi,
    I am upgrading Apps R12.1.1 to Apps R12.1.3 . Applying patch 9239089 as prerequisite of patch 9239090.
    This patch is taking much time and Updating Snapshot Tables as below
    No of records processed =205032 Updating Snapshot Tables...Start time:Sun Nov 20 2011 11:04:15
    Done Updating Snapshot Tables for the above rows...End Time:Sun Nov 20 2011 11:04:17
    No of records processed =210033 Updating Snapshot Tables...Start time:Sun Nov 20 2011 11:06:37
    Done Updating Snapshot Tables for the above rows...End Time:Sun Nov 20 2011 11:06:38
    No of records processed =215033 Updating Snapshot Tables...Start time:Sun Nov 20 2011 11:08:57
    Done Updating Snapshot Tables for the above rows...End Time:Sun Nov 20 2011 11:08:58
    No of records processed =220034 Updating Snapshot Tables...Start time:Sun Nov 20 2011 11:11:17
    Done Updating Snapshot Tables for the above rows...End Time:Sun Nov 20 2011 11:11:18
    No of records processed =225034 Updating Snapshot Tables...Start time:Sun Nov 20 2011 11:13:36
    Done Updating Snapshot Tables for the above rows...End Time:Sun Nov 20 2011 11:13:37
    No of records processed =230035 Updating Snapshot Tables...Start time:Sun Nov 20 2011 11:15:56
    Done Updating Snapshot Tables for the above rows...End Time:Sun Nov 20 2011 11:15:57
    No of records processed =235035 Updating Snapshot Tables...Start time:Sun Nov 20 2011 11:18:16
    Done Updating Snapshot Tables
    Please see if there is any issue or how can avoid to updating snapshot tables.
    Regards,
    Raj

    Hi Raj,
    I am using shared appl_top on NFS file system , and this patch is using the NFS file system . So this issue could be NFS file system.
    when I am performing any write intensive operation on NFS file system it is taking huge time. adadmin utility is also taking muchtime to invoke.I also applied the same patch on a shared APPL_TOP but never had any performance issue.
    So I need some oracle recommendation to use NFS file system or how performance can be tune of nfs file system.?Have you tried to maintain snapshot via adadmin before applying the patch and see how it behaves?
    Oracle Applications Maintenance Utilities
    http://www.oracle.com/technetwork/documentation/applications-167706.html
    Thanks,
    Hussein

  • Report takes long time for few records

    hi frends,
    I m facing one problem with my Web based erp application which is developed in .net , in my application when i open the  report from my applicaiton , in my temp folder there one file gets created name is "rpt conmgr cache"
    bcoz of this for few records also my report takes too much time and opens very slow and it takes long time, and it happens in some of the reports only , other reports are working cool and its not creating any file in temp folder,,, so can u guide me whats this file and what can be the solution for it,
    Thanks
    Mithun

    hi sabhajit,
    i have already checked the sql query it is taking less then seconds.
    any other steps u want me to check then pls let me know?
    thanks mithun

  • Apple Tech. Service Turnaround Time For Repairs?

    I contacted Apple today and made arrangements to send my phone in for either repair or replacement (hope it's repair...) because my usage meter is still not functioning...and my touchscreen has suddenly lost a big degree of sensitivity, taking sometimes 2-3 taps for each function.
    They were kind enough to wave the $30 loaner fee for me, and my Apple Care loaner should be here tomorrow.
    My question: how long is the turnaround time for normal repairs or replacements with Apple?
    I would like my phone back ASAP, naturally.
    Thanks for the help!!

    You're welcome.
    I realize this process seems like it will be inconvenient but it actually works quite well. I went through this within the first few weeks after 6/29 due to occasional crackling with the earpiece. My iPhone was exchanged for a new one and I was impressed with the process. I preferred having Fed-Ex deliver the loaner iPhone - using the same box to return my iPhone and doing the same with my replacement and the loaner iPhone. For me this is preferable than driving to a store and waiting in line, etc. and then returning later to repeat that process. I like doing this from the comforts of home or in my situation, from the comforts of my office.
    Don't sweat it - it will end up being all good.

Maybe you are looking for

  • How do I connect my second PC or Laptop to main PC with router?

    I recently bought a new Desktop PC and had 2 laptops and now have an older Desktop PC! I also bought a WRT150 Wireless-N router to connect to the enternet with both my PC and laptops , to play games , share pictures betwin my PC with friends and fami

  • Outlook 2010 Contact Card (View more options to interact with this person)

    When I double click on a contact, and hover over their email address to "View more ways to interact with this person" - the box shows nothing. This is consistent with all of my contacts, and this is happening to every user at our site - I think it mi

  • Opening new window

    Hi all, I hava one window with enterable fields and when you click on a button it opens another window .Both forms are backed by the same bean since both forms are nearly the same . The bean is a managed bean in request scope . when I fill in the fir

  • Seeking help on SQL Server Monitoring

    Hi Experts, This question is related to monitoring of sql server. 1. I want to send an email alert with all open transactions on SQL Server in HTML report whenever there is sustained 50-60% CPU usage for more than 3 minutes. How to achieve this using

  • URGENT HELP !!! ORA-31011: XML parsing failed

    Hi, Oracle 9.2.0.4 I've run into ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00247: invalid Document Type Declaration (DTD) Error at line 1 ORA-06512: at line 15 during updateXML operation under CLOB resource. It see