Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - How can I set an app to autorun?

 
Thread Tools Search this Thread
Old 07-07-2006, 03:47 PM   #1
Default How can I set an app to autorun?


I am planning on creating an application that generate some kind of
report at a set time each day. say midnight. My question is, is there a
way to autorun that application without requiring a hit from user? I
have search around for the solution for a while and the closest I got
was somebody suggesting to use the System.Timer in the global.aspx.

http://groups.google.com/group/micro...4e8b8e6744111d

Now I have never use the timer before. Does anybody know how I can set
this up? Any help would be appreciated. Thanks



nesster13@yahoo.com
  Reply With Quote
Old 07-07-2006, 03:51 PM   #2
Marina Levit [MVP]
 
Posts: n/a
Default Re: How can I set an app to autorun?
I would use the windows scheduler to schedule your application to run at a
specified period. This is very easy to configure.

<> wrote in message
news: oups.com...
>I am planning on creating an application that generate some kind of
> report at a set time each day. say midnight. My question is, is there a
> way to autorun that application without requiring a hit from user? I
> have search around for the solution for a while and the closest I got
> was somebody suggesting to use the System.Timer in the global.aspx.
>
> http://groups.google.com/group/micro...4e8b8e6744111d
>
> Now I have never use the timer before. Does anybody know how I can set
> this up? Any help would be appreciated. Thanks
>





Marina Levit [MVP]
  Reply With Quote
Old 07-07-2006, 04:03 PM   #3
=?Utf-8?B?RGVtZXRyaQ==?=
 
Posts: n/a
Default RE: How can I set an app to autorun?
Build a Windows Service application. Windows Service apps run unattended.

The service would use a timer to check the current time. If the current time
is the time you
specified as the start time to execute your code then it will execute.

To build a Windows Service check out the following:

http://msdn2.microsoft.com/en-us/library/9k985bc9.aspx

Look also at the "See Also" section at the bottom for how to install a
windows service.

For the timer, take a peek at the Timer class in the System.Timers namespace.

http://msdn2.microsoft.com/en-us/lib...ers.timer.aspx

--
-Demetri


"" wrote:

> I am planning on creating an application that generate some kind of
> report at a set time each day. say midnight. My question is, is there a
> way to autorun that application without requiring a hit from user? I
> have search around for the solution for a while and the closest I got
> was somebody suggesting to use the System.Timer in the global.aspx.
>
> http://groups.google.com/group/micro...4e8b8e6744111d
>
> Now I have never use the timer before. Does anybody know how I can set
> this up? Any help would be appreciated. Thanks
>
>



=?Utf-8?B?RGVtZXRyaQ==?=
  Reply With Quote
Old 07-07-2006, 06:54 PM   #4
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
 
Posts: n/a
Default RE: How can I set an app to autorun?
I think it would be a real waste of resources to create a windows service
that runs all the time just to have it do something once in 24 hours.
Marina's suggestion of using Task Scheduler is to be preferred.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"Demetri" wrote:

> Build a Windows Service application. Windows Service apps run unattended.
>
> The service would use a timer to check the current time. If the current time
> is the time you
> specified as the start time to execute your code then it will execute.
>
> To build a Windows Service check out the following:
>
> http://msdn2.microsoft.com/en-us/library/9k985bc9.aspx
>
> Look also at the "See Also" section at the bottom for how to install a
> windows service.
>
> For the timer, take a peek at the Timer class in the System.Timers namespace.
>
> http://msdn2.microsoft.com/en-us/lib...ers.timer.aspx
>
> --
> -Demetri
>
>
> "" wrote:
>
> > I am planning on creating an application that generate some kind of
> > report at a set time each day. say midnight. My question is, is there a
> > way to autorun that application without requiring a hit from user? I
> > have search around for the solution for a while and the closest I got
> > was somebody suggesting to use the System.Timer in the global.aspx.
> >
> > http://groups.google.com/group/micro...4e8b8e6744111d
> >
> > Now I have never use the timer before. Does anybody know how I can set
> > this up? Any help would be appreciated. Thanks
> >
> >



=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
  Reply With Quote
Old 07-07-2006, 07:50 PM   #5
nesster13@yahoo.com
 
Posts: n/a
Default Re: How can I set an app to autorun?
Thank you all for the reply. I will check them out.


Peter wrote:
> I think it would be a real waste of resources to create a windows service
> that runs all the time just to have it do something once in 24 hours.
> Marina's suggestion of using Task Scheduler is to be preferred.
> Peter
>
> --
> Co-founder, Eggheadcafe.com developer portal:
> http://www.eggheadcafe.com
> UnBlog:
> http://petesbloggerama.blogspot.com
>
>
>
>
> "Demetri" wrote:
>
> > Build a Windows Service application. Windows Service apps run unattended.
> >
> > The service would use a timer to check the current time. If the current time
> > is the time you
> > specified as the start time to execute your code then it will execute.
> >
> > To build a Windows Service check out the following:
> >
> > http://msdn2.microsoft.com/en-us/library/9k985bc9.aspx
> >
> > Look also at the "See Also" section at the bottom for how to install a
> > windows service.
> >
> > For the timer, take a peek at the Timer class in the System.Timers namespace.
> >
> > http://msdn2.microsoft.com/en-us/lib...ers.timer.aspx
> >
> > --
> > -Demetri
> >
> >
> > "" wrote:
> >
> > > I am planning on creating an application that generate some kind of
> > > report at a set time each day. say midnight. My question is, is there a
> > > way to autorun that application without requiring a hit from user? I
> > > have search around for the solution for a while and the closest I got
> > > was somebody suggesting to use the System.Timer in the global.aspx.
> > >
> > > http://groups.google.com/group/micro...4e8b8e6744111d
> > >
> > > Now I have never use the timer before. Does anybody know how I can set
> > > this up? Any help would be appreciated. Thanks
> > >
> > >




nesster13@yahoo.com
  Reply With Quote
Old 07-07-2006, 09:24 PM   #6
nesster13@yahoo.com
 
Posts: n/a
Default Re: How can I set an app to autorun?
Thanks Marina,

Anyhow, I learned that the scheduler only run .exe or .bat file. I am
not very familiar with the format of either of those file type. Does
anybody know where I can find examples of running a .net app from these
file? Thanks


wrote:
> Thank you all for the reply. I will check them out.
>
>
> Peter wrote:
> > I think it would be a real waste of resources to create a windows service
> > that runs all the time just to have it do something once in 24 hours.
> > Marina's suggestion of using Task Scheduler is to be preferred.
> > Peter
> >
> > --
> > Co-founder, Eggheadcafe.com developer portal:
> > http://www.eggheadcafe.com
> > UnBlog:
> > http://petesbloggerama.blogspot.com
> >
> >
> >
> >
> > "Demetri" wrote:
> >
> > > Build a Windows Service application. Windows Service apps run unattended.
> > >
> > > The service would use a timer to check the current time. If the current time
> > > is the time you
> > > specified as the start time to execute your code then it will execute.
> > >
> > > To build a Windows Service check out the following:
> > >
> > > http://msdn2.microsoft.com/en-us/library/9k985bc9.aspx
> > >
> > > Look also at the "See Also" section at the bottom for how to install a
> > > windows service.
> > >
> > > For the timer, take a peek at the Timer class in the System.Timers namespace.
> > >
> > > http://msdn2.microsoft.com/en-us/lib...ers.timer.aspx
> > >
> > > --
> > > -Demetri
> > >
> > >
> > > "" wrote:
> > >
> > > > I am planning on creating an application that generate some kind of
> > > > report at a set time each day. say midnight. My question is, is there a
> > > > way to autorun that application without requiring a hit from user? I
> > > > have search around for the solution for a while and the closest I got
> > > > was somebody suggesting to use the System.Timer in the global.aspx.
> > > >
> > > > http://groups.google.com/group/micro...4e8b8e6744111d
> > > >
> > > > Now I have never use the timer before. Does anybody know how I can set
> > > > this up? Any help would be appreciated. Thanks
> > > >
> > > >




nesster13@yahoo.com
  Reply With Quote
Old 07-07-2006, 09:30 PM   #7
Marina Levit [MVP]
 
Posts: n/a
Default Re: How can I set an app to autorun?
A .net application is an executable. It compiles to a .exe.

What do you think a .net application compiles to?

<> wrote in message
news: ps.com...
> Thanks Marina,
>
> Anyhow, I learned that the scheduler only run .exe or .bat file. I am
> not very familiar with the format of either of those file type. Does
> anybody know where I can find examples of running a .net app from these
> file? Thanks
>
>
> wrote:
>> Thank you all for the reply. I will check them out.
>>
>>
>> Peter wrote:
>> > I think it would be a real waste of resources to create a windows
>> > service
>> > that runs all the time just to have it do something once in 24 hours.
>> > Marina's suggestion of using Task Scheduler is to be preferred.
>> > Peter
>> >
>> > --
>> > Co-founder, Eggheadcafe.com developer portal:
>> > http://www.eggheadcafe.com
>> > UnBlog:
>> > http://petesbloggerama.blogspot.com
>> >
>> >
>> >
>> >
>> > "Demetri" wrote:
>> >
>> > > Build a Windows Service application. Windows Service apps run
>> > > unattended.
>> > >
>> > > The service would use a timer to check the current time. If the
>> > > current time
>> > > is the time you
>> > > specified as the start time to execute your code then it will
>> > > execute.
>> > >
>> > > To build a Windows Service check out the following:
>> > >
>> > > http://msdn2.microsoft.com/en-us/library/9k985bc9.aspx
>> > >
>> > > Look also at the "See Also" section at the bottom for how to install
>> > > a
>> > > windows service.
>> > >
>> > > For the timer, take a peek at the Timer class in the System.Timers
>> > > namespace.
>> > >
>> > > http://msdn2.microsoft.com/en-us/lib...ers.timer.aspx
>> > >
>> > > --
>> > > -Demetri
>> > >
>> > >
>> > > "" wrote:
>> > >
>> > > > I am planning on creating an application that generate some kind of
>> > > > report at a set time each day. say midnight. My question is, is
>> > > > there a
>> > > > way to autorun that application without requiring a hit from user?
>> > > > I
>> > > > have search around for the solution for a while and the closest I
>> > > > got
>> > > > was somebody suggesting to use the System.Timer in the global.aspx.
>> > > >
>> > > > http://groups.google.com/group/micro...4e8b8e6744111d
>> > > >
>> > > > Now I have never use the timer before. Does anybody know how I can
>> > > > set
>> > > > this up? Any help would be appreciated. Thanks
>> > > >
>> > > >

>





Marina Levit [MVP]
  Reply With Quote
Old 07-07-2006, 10:42 PM   #8
nesster13@yahoo.com
 
Posts: n/a
Default Re: How can I set an app to autorun?
Sorry, I do not have very much experience with .net and so did not know
that it compiles to .exe file. When I navigate to the folder that the
application was stored, under the wwwroot folder, I cannot file any
file that has the .exe extention. Do I have to do something to create
the .exe file? Thanks


Marina Levit [MVP] wrote:
> A .net application is an executable. It compiles to a .exe.
>
> What do you think a .net application compiles to?
>
> <> wrote in message
> news: ps.com...
> > Thanks Marina,
> >
> > Anyhow, I learned that the scheduler only run .exe or .bat file. I am
> > not very familiar with the format of either of those file type. Does
> > anybody know where I can find examples of running a .net app from these
> > file? Thanks
> >
> >
> > wrote:
> >> Thank you all for the reply. I will check them out.
> >>
> >>
> >> Peter wrote:
> >> > I think it would be a real waste of resources to create a windows
> >> > service
> >> > that runs all the time just to have it do something once in 24 hours.
> >> > Marina's suggestion of using Task Scheduler is to be preferred.
> >> > Peter
> >> >
> >> > --
> >> > Co-founder, Eggheadcafe.com developer portal:
> >> > http://www.eggheadcafe.com
> >> > UnBlog:
> >> > http://petesbloggerama.blogspot.com
> >> >
> >> >
> >> >
> >> >
> >> > "Demetri" wrote:
> >> >
> >> > > Build a Windows Service application. Windows Service apps run
> >> > > unattended.
> >> > >
> >> > > The service would use a timer to check the current time. If the
> >> > > current time
> >> > > is the time you
> >> > > specified as the start time to execute your code then it will
> >> > > execute.
> >> > >
> >> > > To build a Windows Service check out the following:
> >> > >
> >> > > http://msdn2.microsoft.com/en-us/library/9k985bc9.aspx
> >> > >
> >> > > Look also at the "See Also" section at the bottom for how to install
> >> > > a
> >> > > windows service.
> >> > >
> >> > > For the timer, take a peek at the Timer class in the System.Timers
> >> > > namespace.
> >> > >
> >> > > http://msdn2.microsoft.com/en-us/lib...ers.timer.aspx
> >> > >
> >> > > --
> >> > > -Demetri
> >> > >
> >> > >
> >> > > "" wrote:
> >> > >
> >> > > > I am planning on creating an application that generate some kind of
> >> > > > report at a set time each day. say midnight. My question is, is
> >> > > > there a
> >> > > > way to autorun that application without requiring a hit from user?
> >> > > > I
> >> > > > have search around for the solution for a while and the closest I
> >> > > > got
> >> > > > was somebody suggesting to use the System.Timer in the global.aspx.
> >> > > >
> >> > > > http://groups.google.com/group/micro...4e8b8e6744111d
> >> > > >
> >> > > > Now I have never use the timer before. Does anybody know how I can
> >> > > > set
> >> > > > this up? Any help would be appreciated. Thanks
> >> > > >
> >> > > >

> >




nesster13@yahoo.com
  Reply With Quote
Old 07-07-2006, 10:58 PM   #9
Juan T. Llibre
 
Posts: n/a
Default Re: How can I set an app to autorun?
I think that Marina was referring to assemblies being executable files so,
although her reference to .exe files is incorrect (in ASP.NET), the principle remains the same.

You should create a batch file which runs whichever program you want to run,
and execute it with Task Scheduler, unless you want to run an executable directly.

See :

http://groups.google.com/group/micro...db5e739f60b58f






Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
<> wrote in message news: ups.com...
> Sorry, I do not have very much experience with .net and so did not know
> that it compiles to .exe file. When I navigate to the folder that the
> application was stored, under the wwwroot folder, I cannot file any
> file that has the .exe extention. Do I have to do something to create
> the .exe file? Thanks
>
>
> Marina Levit [MVP] wrote:
>> A .net application is an executable. It compiles to a .exe.
>> What do you think a .net application compiles to?


>> <> wrote in message
>> news: ps.com...
>> > Thanks Marina,
>> >
>> > Anyhow, I learned that the scheduler only run .exe or .bat file. I am
>> > not very familiar with the format of either of those file type. Does
>> > anybody know where I can find examples of running a .net app from these
>> > file? Thanks
>> >
>> >
>> > wrote:
>> >> Thank you all for the reply. I will check them out.
>> >>
>> >>
>> >> Peter wrote:
>> >> > I think it would be a real waste of resources to create a windows
>> >> > service
>> >> > that runs all the time just to have it do something once in 24 hours.
>> >> > Marina's suggestion of using Task Scheduler is to be preferred.
>> >> > Peter
>> >> >
>> >> > --
>> >> > Co-founder, Eggheadcafe.com developer portal:
>> >> > http://www.eggheadcafe.com
>> >> > UnBlog:
>> >> > http://petesbloggerama.blogspot.com
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > "Demetri" wrote:
>> >> >
>> >> > > Build a Windows Service application. Windows Service apps run
>> >> > > unattended.
>> >> > >
>> >> > > The service would use a timer to check the current time. If the
>> >> > > current time
>> >> > > is the time you
>> >> > > specified as the start time to execute your code then it will
>> >> > > execute.
>> >> > >
>> >> > > To build a Windows Service check out the following:
>> >> > >
>> >> > > http://msdn2.microsoft.com/en-us/library/9k985bc9.aspx
>> >> > >
>> >> > > Look also at the "See Also" section at the bottom for how to install
>> >> > > a
>> >> > > windows service.
>> >> > >
>> >> > > For the timer, take a peek at the Timer class in the System.Timers
>> >> > > namespace.
>> >> > >
>> >> > > http://msdn2.microsoft.com/en-us/lib...ers.timer.aspx
>> >> > >
>> >> > > --
>> >> > > -Demetri
>> >> > >
>> >> > >
>> >> > > "" wrote:
>> >> > >
>> >> > > > I am planning on creating an application that generate some kind of
>> >> > > > report at a set time each day. say midnight. My question is, is
>> >> > > > there a
>> >> > > > way to autorun that application without requiring a hit from user?
>> >> > > > I
>> >> > > > have search around for the solution for a while and the closest I
>> >> > > > got
>> >> > > > was somebody suggesting to use the System.Timer in the global.aspx.
>> >> > > >
>> >> > > > http://groups.google.com/group/micro...4e8b8e6744111d
>> >> > > >
>> >> > > > Now I have never use the timer before. Does anybody know how I can
>> >> > > > set
>> >> > > > this up? Any help would be appreciated. Thanks
>> >> > > >
>> >> > > >
>> >

>





Juan T. Llibre
  Reply With Quote
Old 07-10-2006, 03:35 PM   #10
nesster13@yahoo.com
 
Posts: n/a
Default Re: How can I set an app to autorun?
Thanks for all the help. I was able to create a .exe file and execute
it through the task scheduler.


Juan T. Llibre wrote:
> I think that Marina was referring to assemblies being executable files so,
> although her reference to .exe files is incorrect (in ASP.NET), the principle remains the same.
>
> You should create a batch file which runs whichever program you want to run,
> and execute it with Task Scheduler, unless you want to run an executable directly.
>
> See :
>
> http://groups.google.com/group/micro...db5e739f60b58f
>
>
>
>
>
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en español : http://asp.net.do/foros/
> ===================================
> <> wrote in message news: ups.com...
> > Sorry, I do not have very much experience with .net and so did not know
> > that it compiles to .exe file. When I navigate to the folder that the
> > application was stored, under the wwwroot folder, I cannot file any
> > file that has the .exe extention. Do I have to do something to create
> > the .exe file? Thanks
> >
> >
> > Marina Levit [MVP] wrote:
> >> A .net application is an executable. It compiles to a .exe.
> >> What do you think a .net application compiles to?

>
> >> <> wrote in message
> >> news: ps.com...
> >> > Thanks Marina,
> >> >
> >> > Anyhow, I learned that the scheduler only run .exe or .bat file. I am
> >> > not very familiar with the format of either of those file type. Does
> >> > anybody know where I can find examples of running a .net app from these
> >> > file? Thanks
> >> >
> >> >
> >> > wrote:
> >> >> Thank you all for the reply. I will check them out.
> >> >>
> >> >>
> >> >> Peter wrote:
> >> >> > I think it would be a real waste of resources to create a windows
> >> >> > service
> >> >> > that runs all the time just to have it do something once in 24 hours.
> >> >> > Marina's suggestion of using Task Scheduler is to be preferred.
> >> >> > Peter
> >> >> >
> >> >> > --
> >> >> > Co-founder, Eggheadcafe.com developer portal:
> >> >> > http://www.eggheadcafe.com
> >> >> > UnBlog:
> >> >> > http://petesbloggerama.blogspot.com
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > "Demetri" wrote:
> >> >> >
> >> >> > > Build a Windows Service application. Windows Service apps run
> >> >> > > unattended.
> >> >> > >
> >> >> > > The service would use a timer to check the current time. If the
> >> >> > > current time
> >> >> > > is the time you
> >> >> > > specified as the start time to execute your code then it will
> >> >> > > execute.
> >> >> > >
> >> >> > > To build a Windows Service check out the following:
> >> >> > >
> >> >> > > http://msdn2.microsoft.com/en-us/library/9k985bc9.aspx
> >> >> > >
> >> >> > > Look also at the "See Also" section at the bottom for how to install
> >> >> > > a
> >> >> > > windows service.
> >> >> > >
> >> >> > > For the timer, take a peek at the Timer class in the System.Timers
> >> >> > > namespace.
> >> >> > >
> >> >> > > http://msdn2.microsoft.com/en-us/lib...ers.timer.aspx
> >> >> > >
> >> >> > > --
> >> >> > > -Demetri
> >> >> > >
> >> >> > >
> >> >> > > "" wrote:
> >> >> > >
> >> >> > > > I am planning on creating an application that generate some kind of
> >> >> > > > report at a set time each day. say midnight. My question is, is
> >> >> > > > there a
> >> >> > > > way to autorun that application without requiring a hit from user?
> >> >> > > > I
> >> >> > > > have search around for the solution for a while and the closest I
> >> >> > > > got
> >> >> > > > was somebody suggesting to use the System.Timer in the global..aspx.
> >> >> > > >
> >> >> > > > http://groups.google.com/group/micro...4e8b8e6744111d
> >> >> > > >
> >> >> > > > Now I have never use the timer before. Does anybody know how I can
> >> >> > > > set
> >> >> > > > this up? Any help would be appreciated. Thanks
> >> >> > > >
> >> >> > > >
> >> >

> >




nesster13@yahoo.com
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46