Results 1 to 5 of 5

Thread: Schedule

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Ireland
    Posts
    224
    I have a program that runs an archiving routine. I want to give the user the option to schedule the program for a certain time every day. How do I go about this??

    Or how do I access the windows schedular from my program??

    Thanks for any suggestions

    [Edited by kanejone on 09-14-2000 at 10:39 AM]

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    In a timer place
    Code:
    static flag as boolean, old as integer
    If not flag then
       if hour(now)>=8 and minute(now)>=17 and second(now) >=22 then
           'run your thing
           flag=true
       end if
    else
       if hour(now)<old then
           flag=false
       end if
       old=hour(now)
    end if
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Ireland
    Posts
    224

    Question

    Thanks a lot for that. Is there any way to let the user set the time????

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Yep, you could have a inputbox asking for the date, use isdate function to determine if it's valid, and then compare the dates in the procdure i gave you:

    Code:
    if hour(now)>=hour(yourdate) and minute(now)>=minute(yourdate) and second(now) >=second(yourdate) then
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Ireland
    Posts
    224
    Cheers

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