DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 13 Aug 2007 14:23:52 -0400,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Steve
          2    Alexey Smirnov
                 3    Mike
          4    Alexey Smirnov


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
Date:Mon, 13 Aug 2007 14:23:52 -0400   Author:  

Re: read scheduled tasks   
On Aug 13, 8:23 pm, "Steve"  wrote:

> 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
Date:Mon, 13 Aug 2007 19:42:19 -0000   Author:  

Re: read scheduled tasks   
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"  wrote in message 
news:1187034139.376597.116610@19g2000hsx.googlegroups.com...

> On Aug 13, 8:23 pm, "Steve"  wrote:
>> 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
> 
Date:Mon, 13 Aug 2007 15:57:13 -0400   Author:  

Re: read scheduled tasks   
On Aug 13, 9:57 pm, "Mike"  wrote:

> 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"  wrote in message
>
> news:1187034139.376597.116610@19g2000hsx.googlegroups.com...
>
>
>
> > On Aug 13, 8:23 pm, "Steve"  wrote:
> >> 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/ArticleID/25186/25186.html

Cheers!
Date:Mon, 13 Aug 2007 14:18:22 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us