Task Scheduling

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Attila

    #1

    Task Scheduling

    Hi.

    I am looking for a site or some coding ideas to run specific subs or
    programs at certain times and/or dates.
    For example, I would like to automate pulling data via ADO(.NET) at 6 am,
    on the 21st of every month.

    The only thing that I could think of was to set a timer control to fire
    every few seconds to check date and time. I was hoping there was a better
    way to do this without using the Task Scheduler or a product such as
    Automate 5.

    I have googled for hours without much luck.
    Any direction is greatly appreciated.

    Attila


  • Tom Shelton

    #2
    Re: Task Scheduling

    Attila wrote:
    [color=blue]
    > Hi.
    >
    > I am looking for a site or some coding ideas to run specific subs or
    > programs at certain times and/or dates.
    > For example, I would like to automate pulling data via ADO(.NET) at 6 am,
    > on the 21st of every month.
    >
    > The only thing that I could think of was to set a timer control to fire
    > every few seconds to check date and time. I was hoping there was a better
    > way to do this without using the Task Scheduler or a product such as
    > Automate 5.
    >
    > I have googled for hours without much luck.
    > Any direction is greatly appreciated.
    >
    > Attila[/color]

    What's wrong with using the Task Scheduler? If you want to do it
    programatically , I do have some code I could send you... It's a library
    that I wrote in C#, but your welcome to use it if you would like :)

    Tom Shelton

    Comment

    • Horatiu Ripa

      #3
      Re: Task Scheduling

      Yeah, what's wrong with task scheduler?
      Anyway for that kind of things is better to have a service with a thread
      checking with long wait states for the date/hour. If 21/6 start the
      processing.

      --
      Horatiu Ripa
      Software Development Manager
      Business Logic Systems LTD
      21 Victor Babes str., 1st floor, 3400 Cluj-Napoca, Romania
      Phone/Fax: +40 264 590703
      Web: www.businesslogic.co.uk

      This email (email message and any attachments) is strictly confidential,
      possibly privileged and is intended solely for the person or organization to
      whom it is addressed. If you are not the intended recipient, you must not
      copy, distribute or take any action in reliance on it. If you have received
      this email in error, please inform the sender immediately before deleting
      it. Business Logic Systems Ltd accepts no responsibility for any advice,
      opinion, conclusion or other information contained in this email or arising
      from its disclosure.

      "Tom Shelton" <tom@mtogden.co m> wrote in message
      news:#ucc6GPeDH A.3584@tk2msftn gp13.phx.gbl...[color=blue]
      > Attila wrote:
      >[color=green]
      > > Hi.
      > >
      > > I am looking for a site or some coding ideas to run specific subs or
      > > programs at certain times and/or dates.
      > > For example, I would like to automate pulling data via ADO(.NET) at 6[/color][/color]
      am,[color=blue][color=green]
      > > on the 21st of every month.
      > >
      > > The only thing that I could think of was to set a timer control to fire
      > > every few seconds to check date and time. I was hoping there was a[/color][/color]
      better[color=blue][color=green]
      > > way to do this without using the Task Scheduler or a product such as
      > > Automate 5.
      > >
      > > I have googled for hours without much luck.
      > > Any direction is greatly appreciated.
      > >
      > > Attila[/color]
      >
      > What's wrong with using the Task Scheduler? If you want to do it
      > programatically , I do have some code I could send you... It's a library
      > that I wrote in C#, but your welcome to use it if you would like :)
      >
      > Tom Shelton[/color]


      Comment

      • Willy Denoyette [MVP]

        #4
        Re: Task Scheduling

        What's wrong with the task scheduler? You won't let an application sleep just to pull some data once every month, when there is
        already a scheduler service running just for that.

        Willy.


        "Attila" <attilamn@hotma il.com> wrote in message news:ZH98b.399$ jT6.304@twister .rdc-kc.rr.com...[color=blue]
        > Hi.
        >
        > I am looking for a site or some coding ideas to run specific subs or
        > programs at certain times and/or dates.
        > For example, I would like to automate pulling data via ADO(.NET) at 6 am,
        > on the 21st of every month.
        >
        > The only thing that I could think of was to set a timer control to fire
        > every few seconds to check date and time. I was hoping there was a better
        > way to do this without using the Task Scheduler or a product such as
        > Automate 5.
        >
        > I have googled for hours without much luck.
        > Any direction is greatly appreciated.
        >
        > Attila
        >
        >[/color]


        Comment

        • Jay B. Harlow [MVP - Outlook]

          #5
          Re: Task Scheduling

          Attila,
          If you go the Timer route remember there are Three timer classes in .NET

          System.Windows. Forms.Timer
          System.Threadin g.Timer
          System.Timers.T imer

          Based on your description I would consider creating a Windows Service
          project which is where Threading.Timer or Timers.Timer would be the better
          choice.

          Rather than make the timer logic unique to my program I would consider
          making it a standalone program that interacted with mine, so when I needed
          to control multiple programs I would only have 1 scheduler and multiple data
          pulls. Of course this would probably be a Windows Service.

          I would consider using the Task Scheduler if the data pulls occurred
          somewhat infrequent (once a day, week, month). Rather than make my program
          run all week for a 5 minute data pull. Of course if my data pull was a
          service than I would look at Threading.Timer or Timers.Timer...

          Hope this helps
          Jay

          "Attila" <attilamn@hotma il.com> wrote in message
          news:ZH98b.399$ jT6.304@twister .rdc-kc.rr.com...[color=blue]
          > Hi.
          >
          > I am looking for a site or some coding ideas to run specific subs or
          > programs at certain times and/or dates.
          > For example, I would like to automate pulling data via ADO(.NET) at 6 am,
          > on the 21st of every month.
          >
          > The only thing that I could think of was to set a timer control to fire
          > every few seconds to check date and time. I was hoping there was a better
          > way to do this without using the Task Scheduler or a product such as
          > Automate 5.
          >
          > I have googled for hours without much luck.
          > Any direction is greatly appreciated.
          >
          > Attila
          >
          >[/color]


          Comment

          • Attila

            #6
            Re: Task Scheduling

            Tom-

            Would you be able to send me that code? I really would like to learn a
            little more C#.

            Part of the reason why I am not using the Task Scheduler is because of the
            XP images that my work uses. The system admins tell me to just get Automate,
            but my budget for this project has been used up on VB.NET and a Webserver.

            Thank you much!
            Danke
            -Attila


            "Tom Shelton" <tom@mtogden.co m> wrote in message
            news:%23ucc6GPe DHA.3584@tk2msf tngp13.phx.gbl. ..[color=blue]
            > Attila wrote:
            >[color=green]
            > > Hi.
            > >
            > > I am looking for a site or some coding ideas to run specific subs or
            > > programs at certain times and/or dates.
            > > For example, I would like to automate pulling data via ADO(.NET) at 6[/color][/color]
            am,[color=blue][color=green]
            > > on the 21st of every month.
            > >
            > > The only thing that I could think of was to set a timer control to fire
            > > every few seconds to check date and time. I was hoping there was a[/color][/color]
            better[color=blue][color=green]
            > > way to do this without using the Task Scheduler or a product such as
            > > Automate 5.
            > >
            > > I have googled for hours without much luck.
            > > Any direction is greatly appreciated.
            > >
            > > Attila[/color]
            >
            > What's wrong with using the Task Scheduler? If you want to do it
            > programatically , I do have some code I could send you... It's a library
            > that I wrote in C#, but your welcome to use it if you would like :)
            >
            > Tom Shelton[/color]


            Comment

            Working...