exe for scheduled task

C

Curious

I want to create a C#.NET project that will have an .exe executable to
be launched by Task Manager on a set schedule.

Is "Console Application" the right type for the C#.NET project?
 
M

Mr. Arnold

Curious said:
I want to create a C#.NET project that will have an .exe executable to
be launched by Task Manager on a set schedule.

Is "Console Application" the right type for the C#.NET project?

That's one of two you could use. The other one is a Windows form application
that has no controls on the form, a blank form. The code to start the
application would be in the From-Load(). You would hide the form at
Form.Load() before the processing took place, and then you do a
Form-Unload() after processing is complete to end the program, which you can
use the Task Secdular.


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4095 (20090521) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
M

Mr. Arnold

Curious said:
I want to create a C#.NET project that will have an .exe executable to
be launched by Task Manager on a set schedule.

Is "Console Application" the right type for the C#.NET project?

That's one of two you could use. The other one is a Windows form application
that has no controls on the form, a blank form. The code to start the
application would be in the From-Load(). You would hide the form at
Form.Load() before the processing took place, and then you do a
Form-Unload() after processing is complete to end the program, which you can
use the Task Secdular.


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4095 (20090521) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
C

Curious

That's one of two you could use. The other one is a Windows form application
that has no controls on the form, a blank form. The code to start the
application would be in the From-Load(). You would hide the form at
Form.Load() before the processing took place, and then you do a
Form-Unload() after processing is complete to end the program, which you can
use the Task Secdular.

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4095 (20090521) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Thanks!
 
C

Curious

That's one of two you could use. The other one is a Windows form application
that has no controls on the form, a blank form. The code to start the
application would be in the From-Load(). You would hide the form at
Form.Load() before the processing took place, and then you do a
Form-Unload() after processing is complete to end the program, which you can
use the Task Secdular.

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4095 (20090521) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Thanks!
 
M

Miro

I agree with Mr. Arnold.

I would use a form, and set the transparency to 100%.
(invisible form).

You never know later if you want to add your own little monitors and debugs
to it during runtime.

Miro

That's one of two you could use. The other one is a Windows form
application
that has no controls on the form, a blank form. The code to start the
application would be in the From-Load(). You would hide the form at
Form.Load() before the processing took place, and then you do a
Form-Unload() after processing is complete to end the program, which you
can
use the Task Secdular.

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4095 (20090521) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Thanks!
 
M

Miro

I agree with Mr. Arnold.

I would use a form, and set the transparency to 100%.
(invisible form).

You never know later if you want to add your own little monitors and debugs
to it during runtime.

Miro

That's one of two you could use. The other one is a Windows form
application
that has no controls on the form, a blank form. The code to start the
application would be in the From-Load(). You would hide the form at
Form.Load() before the processing took place, and then you do a
Form-Unload() after processing is complete to end the program, which you
can
use the Task Secdular.

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4095 (20090521) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Thanks!
 
G

Gloops

Mr. Arnold a écrit, le 22/05/2009 01:32 :
That's one of two you could use. The other one is a Windows form
application that has no controls on the form, a blank form. The code to
start the application would be in the From-Load(). You would hide the
form at Form.Load() before the processing took place, and then you do a
Form-Unload() after processing is complete to end the program, which you
can use the Task Secdular.


Hello,

You also have another solution. In program.cs in a Windows application,
you find the instruction
Application.Run(new Form1());

If you quote that instruction so that it is not excuted, the form is not
loaded, so you do not even have to unload it, and you can put your
instructions underneath.

Supposing one day you come to need an interface, you can unquote the
instruction that launches the form -and pay attention if you need it
before or after the other instructions.

Of course, supposing the program reaches a certain size, it is important
to remember to keep it a clear structure, for instance by writing static
methods in classes.
 
G

Gloops

Mr. Arnold a écrit, le 22/05/2009 01:32 :
That's one of two you could use. The other one is a Windows form
application that has no controls on the form, a blank form. The code to
start the application would be in the From-Load(). You would hide the
form at Form.Load() before the processing took place, and then you do a
Form-Unload() after processing is complete to end the program, which you
can use the Task Secdular.


Hello,

You also have another solution. In program.cs in a Windows application,
you find the instruction
Application.Run(new Form1());

If you quote that instruction so that it is not excuted, the form is not
loaded, so you do not even have to unload it, and you can put your
instructions underneath.

Supposing one day you come to need an interface, you can unquote the
instruction that launches the form -and pay attention if you need it
before or after the other instructions.

Of course, supposing the program reaches a certain size, it is important
to remember to keep it a clear structure, for instance by writing static
methods in classes.
 
C

Curious

Mr. Arnold a écrit, le 22/05/2009 01:32 :





Hello,

You also have another solution. In program.cs in a Windows application,
you find the instruction
Application.Run(new Form1());

If you quote that instruction so that it is not excuted, the form is not
loaded, so you do not even have to unload it, and you can put your
instructions underneath.

Supposing one day you come to need an interface, you can unquote the
instruction that launches the form -and pay attention if you need it
before or after the other instructions.

Of course, supposing the program reaches a certain size, it is important
to remember to keep it a clear structure, for instance by writing static
methods in classes.

Way to go!
 
C

Curious

Mr. Arnold a écrit, le 22/05/2009 01:32 :





Hello,

You also have another solution. In program.cs in a Windows application,
you find the instruction
Application.Run(new Form1());

If you quote that instruction so that it is not excuted, the form is not
loaded, so you do not even have to unload it, and you can put your
instructions underneath.

Supposing one day you come to need an interface, you can unquote the
instruction that launches the form -and pay attention if you need it
before or after the other instructions.

Of course, supposing the program reaches a certain size, it is important
to remember to keep it a clear structure, for instance by writing static
methods in classes.

Way to go!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top