exe for scheduled task

  • Thread starter Thread starter Curious
  • Start date Start date
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?
 
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
 
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
 
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!
 
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!
 
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!
 
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!
 
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.
 
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.
 
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!
 
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!
 
Back
Top