Results 1 to 5 of 5

Thread: Automate a Windows Service

  1. #1

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Red face Automate a Windows Service

    Hi all,

    In any Windows Service I can set the Startup type either Automatic, Manual or Disabled, on its properties window.

    Ok, I change the Startup type to Automatic on one of my own service. Can I schedule a starting time of it. Say I want to start it 12:00:00 hours. Is there any option to do it.

    I search on the Services properties, but no luck. Anyone know that how to do it?

    Thanks,
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Automate a Windows Service

    You can do that in your application. Or with the windows task scheduler. If you use the latter then you won't be able to install it as a service.

    I suggest you use a timing mechanism in your program to carry out the operation.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Re: Automate a Windows Service

    Yes I do. Simply use a Timer in application(C# .Net service) and I'm confusing with how to deal that initial step. So that's why I'm looking and general way to do it.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Automate a Windows Service

    Check the time as your timer ticks its events away before starting, or use a scheduled task to run net start "your service name".


    Is this a daily thing or first-time-only?

  5. #5

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Re: Automate a Windows Service

    I have planed one thing to do now. Rather looking on a exact time, I try to deal with a time interval. So I don't want to worry about the starting time.

    And also, for your question, yes this is only for the first-time.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

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