Results 1 to 4 of 4

Thread: Timer Or windows Task scheduler?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    69

    Timer Or windows Task scheduler?

    My application needs to export data from Sql to a text file and uploads the text file to a server every hour.
    Which could be a better option to automate this?
    Timer or Task scheduler?

    What all problems you can encounter with a task scheduler.?
    Any insights would be helpful
    thx

  2. #2
    Banned
    Join Date
    Nov 2005
    Posts
    2,367

    Re: Timer Or windows Task scheduler?

    You might want to consider a DTS package. Since this is the database handling most of the load, you probably don't need to make a seperate application to accomodate.

    Assuming you have Enterprise Manager.

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Timer Or windows Task scheduler?

    It may well be a better option to use the built-in capabilities of SQL Server, but assuming that you are going to use a .NET application to do it then it depends on whether you need this action to be performed whether your app is running or not. If you need it to be run every hour whether your app is running or not then a scheduled task is the way to go because Windows will look after things itself. If you only need it to happen when your app is running then a Timer may well be a better option. Just be aware though, that if you use a Timer that raises its events in the UI thread and the UI thread is busy doing something then the event will not be handled until the UI thread decides to process pending events.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    69

    Re: Timer Or windows Task scheduler?

    I didnt do DTS because I have to process the data (validation , formatting , log files etc) b4 sending to text file.
    Since it runs every hour the process takes less than a minute or two to finish. And I dont want my app open 24 hrs if it snot doing anything else.
    So I guess windows task scheduler is a better option in this case.

    Thanks alot for the input.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width