473,395 Members | 2,253 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,395 software developers and data experts.

Windows scheduling

I would like to write a desktop application to create a windows job, say to
run an myApp.exe at 9pm everyday.
Any API or other function I can call?
Feb 15 '07 #1
9 4656
"Alan T" <al*************@yahoo.com.auwrote in message
news:ew****************@TK2MSFTNGP06.phx.gbl...
>I would like to write a desktop application to create a windows job, say to run an
myApp.exe at 9pm everyday.
Any API or other function I can call?

Why not simply execute taskschd.exe using System.Diagnostics.Process.Start?

Willy.

Feb 15 '07 #2
Why not use task scheduler given it already does what your asking for!

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Alan T" <al*************@yahoo.com.auwrote in message
news:ew****************@TK2MSFTNGP06.phx.gbl...
>I would like to write a desktop application to create a windows job, say to
run an myApp.exe at 9pm everyday.
Any API or other function I can call?

Feb 15 '07 #3

"John Timney (MVP)" <x_****@timney.eclipse.co.ukwrote in message
news:ar******************************@eclipse.net. uk...
Why not use task scheduler given it already does what your asking for!
He's asking what function to use to programmatically create task scheduler
jobs.

I don't know a managed solution, but you can p/invoke

NetApiBufferFree
NetScheduleJobAdd
NetScheduleJobDel
NetScheduleJobEnum
NetScheduleJobGetInfo
>
Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Alan T" <al*************@yahoo.com.auwrote in message
news:ew****************@TK2MSFTNGP06.phx.gbl...
>>I would like to write a desktop application to create a windows job, say
to run an myApp.exe at 9pm everyday.
Any API or other function I can call?


Feb 15 '07 #4
Shell to the "AT" command. The cmd shell's AT command is a complete command
line interface to the Windows Task Scheduler.

Mike Ober.

"Ben Voigt" <rb*@nospam.nospamwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
>
"John Timney (MVP)" <x_****@timney.eclipse.co.ukwrote in message
news:ar******************************@eclipse.net. uk...
>Why not use task scheduler given it already does what your asking for!

He's asking what function to use to programmatically create task scheduler
jobs.

I don't know a managed solution, but you can p/invoke

NetApiBufferFree
NetScheduleJobAdd
NetScheduleJobDel
NetScheduleJobEnum
NetScheduleJobGetInfo
>>
Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Alan T" <al*************@yahoo.com.auwrote in message
news:ew****************@TK2MSFTNGP06.phx.gbl...
>>>I would like to write a desktop application to create a windows job, say
to run an myApp.exe at 9pm everyday.
Any API or other function I can call?



Feb 15 '07 #5
"Michael D. Ober" <obermd.@.alum.mit.edu.nospamwrote in message
news:45**********************@news.qwest.net...
Shell to the "AT" command. The cmd shell's AT command is a complete command line
interface to the Windows Task Scheduler.
Schtasks.exe is the successor of the at.exe command line utility, it offer far more options
than "at" and is also the command shell of the task scheduler on Vista and longhorn.

Willy.
Feb 15 '07 #6
Hi,

I would like to write a little program to display a form with a text box for
user to fill in the time, eg. 9 pm.
When the user click the 'OK' button I will create a window scheduled job to
exeute the myApp.exe at 9pm every day.

What will be the code to create the scheduled job?
"Willy Denoyette [MVP]" <wi*************@telenet.bewrote in message
news:up**************@TK2MSFTNGP06.phx.gbl...
"Michael D. Ober" <obermd.@.alum.mit.edu.nospamwrote in message
news:45**********************@news.qwest.net...
>Shell to the "AT" command. The cmd shell's AT command is a complete
command line interface to the Windows Task Scheduler.

Schtasks.exe is the successor of the at.exe command line utility, it offer
far more options than "at" and is also the command shell of the task
scheduler on Vista and longhorn.

Willy.


Feb 15 '07 #7
use SQL Server; it comes with SqlAgent.

it is 100 times more powerful than anything else mentioned here

On Feb 15, 3:16 am, "Alan T" <alanpltseNOS...@yahoo.com.auwrote:
I would like to write a desktop application to create a windows job, say to
run an myApp.exe at 9pm everyday.
Any API or other function I can call?

Feb 16 '07 #8
Hi,

My client may not have SQL Server so my option is to schedule Windows job.

<pf******@hotmail.comwrote in message
news:11**********************@l53g2000cwa.googlegr oups.com...
use SQL Server; it comes with SqlAgent.

it is 100 times more powerful than anything else mentioned here

On Feb 15, 3:16 am, "Alan T" <alanpltseNOS...@yahoo.com.auwrote:
>I would like to write a desktop application to create a windows job, say
to
run an myApp.exe at 9pm everyday.
Any API or other function I can call?


Feb 19 '07 #9
your client may not have SQL Server?

then give them free MSDE 2.0
I think that we all should boycott SQL 2005 Express until they put SQL
agent back in it


On Feb 18, 4:50 pm, "Alan T" <alanpltseNOS...@yahoo.com.auwrote:
Hi,

My client may not have SQL Server so my option is to schedule Windows job.

<pfc_s...@hotmail.comwrote in message

news:11**********************@l53g2000cwa.googlegr oups.com...
use SQL Server; it comes with SqlAgent.
it is 100 times more powerful than anything else mentioned here
On Feb 15, 3:16 am, "Alan T" <alanpltseNOS...@yahoo.com.auwrote:
I would like to write a desktop application to create a windows job, say
to
run an myApp.exe at 9pm everyday.
Any API or other function I can call?- Hide quoted text -

- Show quoted text -

Mar 12 '07 #10

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

Similar topics

1
by: corrado | last post by:
Hello I have an application running several thread to display some financial data; basically I have a thread displaying HTML tables by means of Tkhtml, another implementing a scrolling ticker...
11
by: Codemonkey | last post by:
Hi, I am writing an App in .Net that involves some scheduling of tasks. I was wondering if anybody has come accross any components or examples of how to implement a schedule manager like the one...
6
by: Tony Proctor | last post by:
Hi everyone We're experiencing some serious anomalies with the scheduling of ASP threads. I'd be interested to hear if anyone knows what algorithm is used (e.g. simple round-robin, or something...
19
by: DW | last post by:
Hi, all... I have a sizeable database running under Oracle 9.2.0.4 under AIX 5.2.0. I am faced with an impending move to a Windows environment, running under SQL 2000. Currently, we are...
3
by: Muscha | last post by:
Hi, In our application we need to have a high performance scheduling framework. We want to be able to say for item 21 do an update on such and such time. We will have around 1 million items of...
3
by: Alphonse Giambrone | last post by:
Can anyone point me toward a good example of an asp.net scheduling app? Preferrably in vb.net. TIA -- Alphonse Giambrone Email: a-giam at customdatasolutions dot us
0
by: Steve W | last post by:
Hi, Our application needs to run a number of tasks in background - they are generally functionally unrelated and do different things but essentially they all run a particular process at...
0
by: mcteard | last post by:
I,m trying to run the DB2 scheduler (DB2 v8.2) on windows server 2003 web edition. It runs for 5 days max and then stops scheduling. DAS is still running and there are no helpful messages in...
2
Ritchie
by: Ritchie | last post by:
Please can anyone help me with d programs in C for CPU scheduling: WAP to show FCFS scheduling algorithm. WAP to show SJF scheduling algorithm. WAP to show Priority scheduling algorithm. WAP...
5
by: cmrhema | last post by:
Hi All, I have a Windows application that should run 24*7, I scheduled the task and gave run when system starts, neither did it pop the windows screen, or did it run. I could not see the windows...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
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,...

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.