Results 1 to 4 of 4

Thread: Running an exe on schedule

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Location
    Croatia
    Posts
    183

    Running an exe on schedule

    Hey guys,

    I'd like to know is it possible, and if it is then how, to run an exe file on schedule (specifed date and time) ?

    I suppose it should be written in the registry somehow, but how and where?

    Thank you,
    Nebo
    It has been said that something as
    small as the flutter of a butterfly's
    wing can ultimately cause a typhoon
    halfway around the world...


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

    Re: Running an exe on schedule

    You can use SchTasks.exe for this, which allows you to manipulate Windows Scheduled Tasks. Look in the Windows help for the correct syntax and then use Process.Start to issue the commands required to create or edit your job.

    Edit:
    Just to note, if you're talking about running your EXE on a schedule then use the above method. If you're talking about running a different EXE, then you can use a Timer in your app to run anything else on schedule.
    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

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Location
    Croatia
    Posts
    183

    Re: Running an exe on schedule

    Thanks jmcilhinney, I found it in Help File, and looked at its syntax, but I really don't understand how to use it.

    Please, if you can, write just a small code example.

    Thanks,
    Nebo
    It has been said that something as
    small as the flutter of a butterfly's
    wing can ultimately cause a typhoon
    halfway around the world...


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

    Re: Running an exe on schedule

    I'm afraid I've never used it in anger. I intended to but there was apparently an issue with my Windows installation. I had reserached it all and started writing code but I was geting some odd exceptions. I tried the same code on another installation on a different partition and there was no issue. I concluded that it was an OS issue and scrapped the plan until my next machine upgrade. This was all some time ago and I haven't bought a new system yet so I haven't gone back to it. All I can recommend is that you experiment, which is what I did.
    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

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