473,382 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

demon (stand alone executable) question

Tom
Hi folks,

(note: Newbie post)

I have inherited the code maintenance and development of an existing
internal webservice written in c#. It's a fairly standard client, appserver,
dbserver architecture and essentially determines an employees to do list. I
has been developed in Visual studio, which is new for me as well.

I am required to add the ability for the application to email reminders to
employees if their tasks are overdue.

I can determine the list of user's emails from the database using a
'get_overdue_email' stored procedure.

What I need to write is a executable, that can be run from the commandline
for example: C:>emaildemon \60 which invokes my executable, runs the stored
procedure every 60 minutes, calls the mailer passing the list of users and
appropriate subject etc etc. Note the demon will continue to run every 60
mins, until a C:>emaildemon \stop command is issued so some kind of
'sleep' state needs to be entered.

Can anyone point me in the direction of an example project or code example,
which I can base my app on.

Any tips or suggestions... the functionality is pretty much as described,
the implementation (i.e. command line) is not at all fixed.
Thanks

Tom
Jul 21 '05 #1
5 1366
Tom <re***@list.please> wrote:
(note: Newbie post)

I have inherited the code maintenance and development of an existing
internal webservice written in c#. It's a fairly standard client, appserver,
dbserver architecture and essentially determines an employees to do list. I
has been developed in Visual studio, which is new for me as well.

I am required to add the ability for the application to email reminders to
employees if their tasks are overdue.

I can determine the list of user's emails from the database using a
'get_overdue_email' stored procedure.

What I need to write is a executable, that can be run from the commandline
for example: C:>emaildemon \60 which invokes my executable, runs the stored
procedure every 60 minutes, calls the mailer passing the list of users and
appropriate subject etc etc. Note the demon will continue to run every 60
mins, until a C:>emaildemon \stop command is issued so some kind of
'sleep' state needs to be entered.

Can anyone point me in the direction of an example project or code example,
which I can base my app on.

Any tips or suggestions... the functionality is pretty much as described,
the implementation (i.e. command line) is not at all fixed.


It sounds like what you *really* want is a Windows service, which is
pretty easy to write in .NET. You could have a command line app to
start/stop/configure it if absolutely necessary, but you can do pretty
much everything use net start/stop anyway.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2
Tom
Jon,

I've done some reading, and this does sound like what I want... One more
question

My web application has a webbased administrative logon, for things like
entering new users into the database . Will it be possible to stop and start
windows services on my app server machine from a client browser?

thanks

Tom
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Tom <re***@list.please> wrote:
(note: Newbie post)

I have inherited the code maintenance and development of an existing
internal webservice written in c#. It's a fairly standard client, appserver, dbserver architecture and essentially determines an employees to do list. I has been developed in Visual studio, which is new for me as well.

I am required to add the ability for the application to email reminders to employees if their tasks are overdue.

I can determine the list of user's emails from the database using a
'get_overdue_email' stored procedure.

What I need to write is a executable, that can be run from the commandline for example: C:>emaildemon \60 which invokes my executable, runs the stored procedure every 60 minutes, calls the mailer passing the list of users and appropriate subject etc etc. Note the demon will continue to run every 60 mins, until a C:>emaildemon \stop command is issued so some kind of
'sleep' state needs to be entered.

Can anyone point me in the direction of an example project or code example, which I can base my app on.

Any tips or suggestions... the functionality is pretty much as described, the implementation (i.e. command line) is not at all fixed.


It sounds like what you *really* want is a Windows service, which is
pretty easy to write in .NET. You could have a command line app to
start/stop/configure it if absolutely necessary, but you can do pretty
much everything use net start/stop anyway.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #3
Tom <re***@list.please> wrote:
I've done some reading, and this does sound like what I want... One more
question

My web application has a webbased administrative logon, for things like
entering new users into the database . Will it be possible to stop and start
windows services on my app server machine from a client browser?


Well, I don't know what programmatic access there is to the windows
services, but you could always run "net stop" or "net start" (with
appropriate parameters) using the Process class.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #4
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Well, I don't know what programmatic access there is to the windows
services, but you could always run "net stop" or "net start" (with
appropriate parameters) using the Process class.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


The System.ServiceProcess.ServiceController class would be the "programmatic
access" solution. It has methods for starting, stopping, pausing,
continuing, etc, etc... a windows service.

Good luck,
Ryan LaNeve
MCSD.NET
Jul 21 '05 #5
Tom
Thanks for your help
"Ryan LaNeve" <rl*****@noaviincspam.com> wrote in message
news:#y**************@TK2MSFTNGP09.phx.gbl...
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Well, I don't know what programmatic access there is to the windows
services, but you could always run "net stop" or "net start" (with
appropriate parameters) using the Process class.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
The System.ServiceProcess.ServiceController class would be the

"programmatic access" solution. It has methods for starting, stopping, pausing,
continuing, etc, etc... a windows service.

Good luck,
Ryan LaNeve
MCSD.NET

Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: none | last post by:
Howdy all, I'm wondering if someone could give some direction on a problem I have or share their experiences. I'm wanting to create a little PHP application that will run on a local machine...
121
by: David Pendrey | last post by:
I was wondering if it is at all posible to write a stand alone .EXE program in Visual Studio .NET. Hopefully in VB.NET but if not another language would be ok. Thanks for the assistance
3
by: Todd D. Levy | last post by:
What do I need to get (from Microsoft I assume) in order to distribute stand alone Access applications to people who do not (and will not) have Access installed on their systems? I have heard...
16
by: Roman Yankin | last post by:
Hello All, Is there a way to compile C# windows application as a stand alone program? In my univ class we don't have VS.NET installed and I need to have my executable running with out .NET...
5
by: Tom | last post by:
Hi folks, (note: Newbie post) I have inherited the code maintenance and development of an existing internal webservice written in c#. It's a fairly standard client, appserver, dbserver...
7
by: David S. Zuza | last post by:
Does anybody know if it is possible to develop stand alone vb2005 apps that require no install and could be run from a flash drive or cd? If so I am trying to figure it out. thanx in advance.
1
by: samfori | last post by:
i'm just new and i want to know how to build a stand alone program (executable)from scripts of C++ code i.e. from .h and .cpp files
2
by: Zehra Ali | last post by:
I was wondering if anyone knew how one could go about developing a stand alone executable version of a web based application written in Java . Currently we are using Net beans platform. The...
5
jinalpatel
by: jinalpatel | last post by:
We have access database which is stand alone application. It is sitted at 21 different locations including one main office. Every month the transactions are copied in to disk and sent to the main...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.