continious script

Last post 06-06-2007 11:07 PM by GarF1eld!. 8 replies.

Sort Posts:

  • continious script

    05-31-2007, 2:45 PM
    • Member
      29 point Member
    • GarF1eld!
    • Member since 05-09-2007, 4:29 AM
    • Posts 25

      I have a script, which checks email. I need to make this script running continuously. How can I do it, that the server has not killed it. And how can I start it? And what I must to do that start script again if server reboots?

  • Re: continious script

    05-31-2007, 3:30 PM
    • Member
      273 point Member
    • tmmycat
    • Member since 05-31-2007, 3:41 PM
    • Posts 95

    Sounds like a Windows service might work; it would run continuously in the background, after you create the service you can start and stop it through Control Panel > Administrative Tools > Services, and you can set it to start automatically when the server reboots.  Google ".net windows services" for more info.

  • Re: continious script

    05-31-2007, 3:38 PM
    • Participant
      1,373 point Participant
    • KyD
    • Member since 05-14-2007, 3:06 PM
    • Posts 372

    I agree with tmmycat because it does not make sense to put it in a web form.

    You can also use the Windows Task Scheduler.  http://support.microsoft.com/kb/308569

    IF Helpful() THEN
    chkboxMarkAsAnswer.checked = TRUE
    END IF

    KyD
  • Re: continious script

    06-01-2007, 12:22 AM
    • Member
      29 point Member
    • GarF1eld!
    • Member since 05-09-2007, 4:29 AM
    • Posts 25

    What I gonna do if I haven't rights to use my windows servise on the remoted server. Becides, I don't know how to create windows service and how is it works.

    hosting is on godaddy.com 

  • Re: continious script

    06-01-2007, 8:34 AM
    • Member
      29 point Member
    • GarF1eld!
    • Member since 05-09-2007, 4:29 AM
    • Posts 25

    What will happen If I create web service and a web method there, which runs itself bebore ending? What problems I could have?

  • Re: continious script

    06-05-2007, 5:11 PM
    • Participant
      1,373 point Participant
    • KyD
    • Member since 05-14-2007, 3:06 PM
    • Posts 372

    Have you considered an auto-refresh of the form?  Is that an option?

    IF Helpful() THEN
    chkboxMarkAsAnswer.checked = TRUE
    END IF

    KyD
  • Re: continious script

    06-05-2007, 9:57 PM

    GarF1eld!:

    What I gonna do if I haven't rights to use my windows servise on the remoted server. Becides, I don't know how to create windows service and how is it works.

    hosting is on godaddy.com 

    Hi GarF1eld,
    I suggest you to try use windows service in your project, to know windows service, see this link: http://www.codeproject.com/dotnet/simplewindowsservice.asp


    Also I suggest you try to use Thread or ThreadPool in your project.


    To know Thread or ThreadPool, please visit the following URLs:


    http://msdn2.microsoft.com/en-us/library/system.threading.thread.currentuiculture.aspx


    http://msdn2.microsoft.com/en-us/library/system.threading.threadpool(vs.80).aspx

    Additionally, you had to writing a closed-loop method to check e-mail. and you can try the following code to solve your problems,       


    while(true)


    {


        CheckMail();


        Thread.Sleep(2000);


    }

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    Hope it helps,


    Hong Gang


     

     

    Hong-Gang Chen
    Microsoft Online Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: continious script

    06-05-2007, 10:04 PM
    • Member
      99 point Member
    • Sarvis
    • Member since 07-31-2006, 7:13 PM
    • Posts 58
    If you just need to read emails from a remote account you could write the windows service and run it from your local machine, it would just connect to the remote server and grab the email.
  • Re: continious script

    06-06-2007, 11:07 PM
    Answer
    • Member
      29 point Member
    • GarF1eld!
    • Member since 05-09-2007, 4:29 AM
    • Posts 25

    I have not rights to use windows servieces in my web application.

    I've got useful link: http://west-wind.com/weblog/posts/67557.aspx

    I hope, it helpsWink

Page 1 of 1 (9 items)