473,667 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

read scheduled tasks

Here is what I want to do. Currently I have to log into 30 servers every morning and see if all the jobs under 'scheduled tasks' ran. Is there a way from .NET to read that directory for the selected server?

So I want a web page, it will have a drop down box with all the servers I log into every day. I then want to select a server and read the all the Scheduled tasks and list them in a grid view. Is this possible using C# and ASP.NET
Aug 13 '07 #1
3 6363
On Aug 13, 8:23 pm, "Steve" <St...@communit y.nospam.comwro te:
Here is what I want to do. Currently I have to log into 30 servers
every morning and see if all the jobs under 'scheduled tasks' ran.
Is there a way from .NET to read that directory for the selected server?
Example: Wrapper Classes for the Windows Task Scheduler
http://mvps.org/emorcillo/en/code/shell/tasksched.shtml

So I want a web page, it will have a drop down box with all the servers
I log into every day. I then want to select a server and read the all the
<Scheduled tasks and list them in a grid view. Is this possible using
C# and ASP.NET
Why do you want to have a web page? It's a pure Windows task and
basically you don't need any .NET for that. XP/Win2003 have a special
tool for that, schtasks.exe

In the command line type

schtasks /query /s servername

to get result as a file

schtasks /query /s servername /fo CSV /nh >c:\log.csv

More info: http://support.microsoft.com/kb/814596

Hope this helps

Aug 13 '07 #2
Ok, thanks I'll check out the wrapper class

Why do you want to have a web page? It's a pure Windows task and
basically you don't need any .NET for that. XP/Win2003 have a special
tool for that, schtasks.exe
I want to be able to check every server without logging in or typing the
server names 30 times every day. I want to have the ability to pick my
server, click go and see my results. Then I can print or send an email and
show which jobs failed.

its more of a conveniece thing then anything and to see if it can be done. I
already have a page that does this for SQL jobs, so I wanted to see if I
could do it with Windows task as well.

"Alexey Smirnov" <al************ @gmail.comwrote in message
news:11******** **************@ 19g2000hsx.goog legroups.com...
On Aug 13, 8:23 pm, "Steve" <St...@communit y.nospam.comwro te:
>Here is what I want to do. Currently I have to log into 30 servers
every morning and see if all the jobs under 'scheduled tasks' ran.
Is there a way from .NET to read that directory for the selected server?

Example: Wrapper Classes for the Windows Task Scheduler
http://mvps.org/emorcillo/en/code/shell/tasksched.shtml

>So I want a web page, it will have a drop down box with all the servers
I log into every day. I then want to select a server and read the all the
<Scheduled tasks and list them in a grid view. Is this possible using
C# and ASP.NET

Why do you want to have a web page? It's a pure Windows task and
basically you don't need any .NET for that. XP/Win2003 have a special
tool for that, schtasks.exe

In the command line type

schtasks /query /s servername

to get result as a file

schtasks /query /s servername /fo CSV /nh >c:\log.csv

More info: http://support.microsoft.com/kb/814596

Hope this helps

Aug 13 '07 #3
On Aug 13, 9:57 pm, "Mike" <M...@community .nospam.comwrot e:
Ok, thanks I'll check out the wrapper class

Why do you want to have a web page? It's a pure Windows task and
basically you don't need any .NET for that. XP/Win2003 have a special
tool for that, schtasks.exe

I want to be able to check every server without logging in or typing the
server names 30 times every day. I want to have the ability to pick my
server, click go and see my results. Then I can print or send an email and
show which jobs failed.

its more of a conveniece thing then anything and to see if it can be done. I
already have a page that does this for SQL jobs, so I wanted to see if I
could do it with Windows task as well.

"Alexey Smirnov" <alexey.smir... @gmail.comwrote in message

news:11******** **************@ 19g2000hsx.goog legroups.com...
On Aug 13, 8:23 pm, "Steve" <St...@communit y.nospam.comwro te:
Here is what I want to do. Currently I have to log into 30 servers
every morning and see if all the jobs under 'scheduled tasks' ran.
Is there a way from .NET to read that directory for the selected server?
Example: Wrapper Classes for the Windows Task Scheduler
http://mvps.org/emorcillo/en/code/shell/tasksched.shtml
So I want a web page, it will have a drop down box with all the servers
I log into every day. I then want to select a server and read the all the
<Scheduled tasks and list them in a grid view. Is this possible using
C# and ASP.NET
Why do you want to have a web page? It's a pure Windows task and
basically you don't need any .NET for that. XP/Win2003 have a special
tool for that, schtasks.exe
In the command line type
schtasks /query /s servername
to get result as a file
schtasks /query /s servername /fo CSV /nh >c:\log.csv
More info:http://support.microsoft.com/kb/814596
Hope this helps- Hide quoted text -

- Show quoted text -
You can also use schtasks.exe and local scheduler on the web server to
create a file, for example, in CSV format. That file can be parsed and
analyzed from ASP.NET. The advantage of this approach is that you
don't need to run the whole ASP.NET application under admin account
who has an access to all remote servers you need to monitor (I guess
you wound need it). If you decided to use the schtasks utility, you
can run it in scheduler with admin account and ASP.NET can be run
under default account.

There's also a hack that allows you to execute schtasks under Win2000
http://www.windowsitpro.com/Article/...186/25186.html

Cheers!

Aug 13 '07 #4

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

Similar topics

5
4768
by: Bart Simpson | last post by:
Hi, I want to control 'Scheduled Tasks' in Windows 2003 by python program. But I couldn't find any Python module about win32 'Scheduled Tasks'. I could find only Perl module about it. (see http://taskscheduler.sourceforge.net) But, I want to control 'Scheduled Tasks' by python :) Is there any python module about win32 'Scheduled Tasks'?
4
14694
by: Colin Steadman | last post by:
We have a number of scheduled tasks on our IIS server that run daily at some point during the early morning. These tasks run as a specific user that has the correct permissions to perform whatever task (processing SQL so I'm told) I have been asked if I can setup a page within ASP that a user could logon to with their own credentials (this I can do). And once logged on be presented with a list of scheduled tasks which they can then...
6
8240
by: John Bowman | last post by:
Hi, I have a C# app that needs to launch the "Add Scheduled Tasks" wizard found in the control panel "Scheduled Tasks" applet. I realize that this "applet" really just opens the tasks folder, but I need to launch the add tasks wizard inside the folder. Does anyone have any ideas of how to do this? I can't find anything in the MSDN regarding this. All it mentions is the Task Scheduler API and I can't seem to find it in there either. Did...
3
22951
by: Lenn | last post by:
Hi, I developed a console .exe application which is going to run on scheduled basis, it will be scheduled to run in Windows Scheduled tasks. Client wants some kind of utility that would help them manage scheduled tasks on different servers. So, how can I add scheduled task to local machine or remote servers programmatically? Thanks.
1
4016
by: Matthew Connor | last post by:
Hi all! I need to be able to create Windows Scheduled Tasks and then read the properties of those tasks back in VB6. Because I could not find any APIs to interface with Windows Task Scheduler, I have shelled out to the AT.EXE command and passed the parameters there. So at this point, I have a working program that creates tasks to my liking. If any of you know a better way to do it (say, through an API call) I would very much like to...
3
3440
by: kj7ny | last post by:
How can I access and manipulate Scheduled Tasks in Windows using Python? I have a Windows XP workstation running Python 2.4.4 using the win32all modules to control the windows services on multiple Windows 2003 servers. It works great. However, I also need to remotely collect the settings for the scheduled tasks (on those same Windows 2003 servers) and then manipulate those task settings.
0
8153
by: kkkanoor | last post by:
I am trying to schedule tasks in Windows from my C# program. The tasks get listed in Windows Schedule Tasks list, but it is not getting invoked. It seems I need to give the user name and password to start the task OR I have to set the property "RunOnlyIfLoggedOn" to true. But I don't know how to do this. Please help. The following code I used is posted in one of the forums. Please find the code below. --- CODE --- simply use...
1
1631
by: naveensrirangam | last post by:
We want to do a total 10 number of scheduled tasks daily. These tasks will run in certain time in daily and every task application developed in different technologies . Now we are looking to do a automation system for all the daily scheduled processes.what is the best approach to check and run the scheduled events / tasks.
0
1348
by: BD | last post by:
I'm running 8.2 on Windows. I have a situation where several scheduled tasks were created in Task Center, under an ID of a person who is leaving the organization. This person's ID is to be deleted, but I see no way of reassigning the owner of these tasks. And I can't change permissions on the tasks without logging in as that 'owner' ID. Is renaming the ID and resetting the password a viable option here?
0
8367
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8889
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8570
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8650
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2781
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 we have to send another system
2
1779
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.