473,513 Members | 2,339 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Add a new task with the task scheduler using C#

Is there a way to add a new task with the task scheduler using C#? For
instance, if you want to add a program to be run at boot time.
Sep 15 '06 #1
4 20194
Joachim wrote:
Is there a way to add a new task with the task scheduler using C#? For
instance, if you want to add a program to be run at boot time.
Look at this:

http://www.codeproject.com/csharp/TSNewLib.asp
Sep 15 '06 #2
The basic stuff can be done with the command line AT but not run on boot or
anything like that.
There is a Win Api for it. A discussion of using it is here:
http://www.tek-tips.com/viewthread.c...=356060&page=7

HTH

Ciaran O'Donnell
"Joachim" wrote:
Is there a way to add a new task with the task scheduler using C#? For
instance, if you want to add a program to be run at boot time.
Sep 15 '06 #3

"Joachim" <Jo*****@discussions.microsoft.comwrote in message
news:64**********************************@microsof t.com...
| Is there a way to add a new task with the task scheduler using C#? For
| instance, if you want to add a program to be run at boot time.

The easiest way is to issue a schtasks commandline utility command using
System.Diagnostics.Process.Start

Enter:
schtasks /create /?
from the command line for details and sample or search windows help for
schtasks.

Willy.

Sep 15 '06 #4

"Ciaran O''Donnell" <Ci************@discussions.microsoft.comwrote in
message news:B4**********************************@microsof t.com...
| The basic stuff can be done with the command line AT but not run on boot
or
| anything like that.
| There is a Win Api for it. A discussion of using it is here:
| http://www.tek-tips.com/viewthread.c...=356060&page=7
|

You should use schtasks which is a more powerfull superset of the AT
command.
schtasks can create a task that should run at system start (using the
ONSTART modifier).

Willy.
Sep 15 '06 #5

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

Similar topics

12
8746
by: Chuck Anderson | last post by:
Can anyone point me in the right direction? I want to use Php to automate confirmation of someone joining an email list by them replying to an email (so they don't have to have a browser?). I...
6
1025
by: Tony Roost | last post by:
I have created a test VB.Net form that will use MS Word to check the spelling of text in an input box The test application runs without a problem and I quit the word application at the end of the...
0
1685
by: Prasad Patil | last post by:
Hi dudes, I have a intranet site, I have a web based form, once the user fills the form, the data entered by the form should get created as a task for some of the predefined users. I need to know...
3
5181
by: Pat | last post by:
A97, WinXP Hello, I am looking for a way to create a task (in the windows task scheduler) from an Access MDB using VBA. I found this great DLL: ...
1
1363
by: Visual Systems AB \(Martin Arvidsson\) | last post by:
Hi! I'm trying to use the "ref" to return a value, see snippet below. I execute AddTask first, this executes FindTaskByID. The compiler gives me this error... (55): Argument '2': cannot...
4
343
by: Christina | last post by:
Dear All, How can I pop up the windows task scheduler inside of my .net application? Such as I have a button called Schedule Now, after clicking it, the Add Scheduled Task window will pop up,...
1
7476
by: Myster Edd | last post by:
I have a strange problem that I think deals with security on SQL 2005. I have a scheduled task that runs on a Windows 2000 machine. It calls a vb script which creates a connection to SQL Server. ...
0
978
by: dhaval0011 | last post by:
Hi, Does anyone know some code that will allow me to enable and/or disable a task which already exists in the task scheduer. This topic has already been discussed in this forum, and also Mr....
0
7267
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7391
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5697
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4754
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3235
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1609
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
466
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.