.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Schedule a task with windows scheduler and vb script.

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :ASP.Net


I need to schedule a task in my system with windows task scheduler and vbscript(or js also). 

I want to send an http request for an aspx page in my project fom the vbscript file .This aspx page contains some database related operations.

That means when the task scheduler is started it should update my project db.


I got this link for reference


But it is not working for me.

Can anybody pls help me to accomplish this task? Can i use javascript instead of vb script?

My project is in C# and backend is sql server express 2008

Thanks, in advance




View Complete Post

More Related Resource Links

Windows with C++: Task Scheduler 2.0


The new Task Scheduler in Windows Vista can do so much more than previous versions. We introduce some basic concepts and building blocks you can put to use in your own scheduled task projects.

Kenny Kerr

MSDN Magazine October 2007

Task scheduler in C#(windows)


hello all,

i am trying to make a task scheduler using C#.net (a desktop application). I have an example to help in doing this job which registers an exe file compliled using C# in visual studio. According to this example, this service after registering runs and looks which job is scheduled and at what time. When found, a particuler job(programe) runs automatically.

I have done accoding to this example but i did not achieve my goal! I have a poor idea of such assignments! I request you to please help me!

Here is the code that I am using:

(A component file)

using System;

using System.ComponentModel;

using System.Collections;

using System.Diagnostics;

using System.ServiceProcess;

using System.Xml;

using System.Timers;

using System.Threading;

using System.Configuration;

Scripting: Windows Script Host 5.6 Boasts Windows XP Integration, Security, New Object Model


Windows Script Host (WSH) 5.6, a major upgrade for the WSH environment, provides some significant improvements over previous versions. A brand new security model that is tightly integrated with security in Windows XP allows administrators to place fine-grained restrictions on scripts reducing the risk from malicious code. In addition, local scripts can now run on remote machines, and enhancements to the object model reduce the amount of boilerplate code needed when writing professional code. This overview of WSH 5.6 explains these changes and how .NET and scripting work together.

Dino Esposito

MSDN Magazine May 2002

Windows Script Host: New Code-Signing Features Protect Against Malicious Scripts


Downloading scripts from the Web or e-mail leaves users vulnerable to security risks because scripts can't be signed. But now developers can use Windows Script Host (WSH) to hash scripts so users can verify their source and safety. With WSH, scripts can be signed or verified using all the same tools ordinarily used to sign EXE, CAB, DLL, and OCX files. This article discusses public-key cryptosystems, the process of signing and verifying scripts in WSH, and several warnings about attacks that could potentially be made against cryptographically secured scripts and ways in which to avoid them.

Eric Lippert

MSDN Magazine April 2001

FTP Task working in XP but not working in Windows 7/2008 machines

Hey , A FTP Task in IS pkg is working fine when executed through BIDS in my Win XP machine ..but the same package is not working in Win 7/2008 machine. FTP task fails with the error : [FTP Task] Error: Unable to connect to FTP server using "FTPFolder.TempData.com". Here are few facts about my troubleshooting : 1) From my XP machine... I am able to connect to the FTP Server using DOS Cmds but fails in 2008 machine saying "Unknown host" I did : Run>Cmd>FTP>Open FTPFolder.TempData.com 2) I can view the files on the FTP server through a browser ( URL was given )on both the machines with no issues. 3) I created Port exception for 20 & 21 Ports for 2008 machine ...still no luck. 4) When I PING the FTP server --Cmd>PING FTPFolder.TempData.com On XP Machine...though FTP Server Name is resolved to IP... I still receive "Request timed out." On 2008 Machine ...the IP is not even resolved and error is thrown "Ping request could not find host FTPFolder.TempData.com. Please check the name and try again." 5) I am connecting to FTP Server from my Office machines. I have searched all the threads on this FTP error topic and haven't found the apt thread..so I have opened a new one.

C# newbie stuck - trying to access column data in a SharePoint list in an SSIS script task

Hello, I'm sure this is the simplest question but I can't figure it out, even with Google's help. I am trying to stumble through some C# code in an SSIS script task and I am frustrated that I can't figure out how to do the easiest things.  I eventually want to find data in a column,and then use another list as a lookup to replace that value with another where the existing value matches a value in the lookup list.  So, the data in my (multiple choice) column might be "apples; bananas" and in another list I have a row that contains two columns, the first holding the value "Apples" and the second containing "Red Delicious" and my original column should read: "Red Delicious; bananas." But, alas, I can't even figure out how to see the data that is in a column. Here is my code: /*<br/> Microsoft SQL Server Integration Services Script Task<br/> Write scripts using Microsoft Visual C# 2008.<br/> The ScriptMain is the entry point class of the script.<br/> */<br/> <br/> using System;<br/> using System.Data;<br/> using Microsoft.SharePoint;<br/> using Microsoft.SqlServer.Dts.Runtime;<br/> using System.Windows.Forms;<br/> using Microsoft.SharePoint.Utilities;<br/> <br/> namespace ST_08becda4c05c49cd9f30ea76110076cd.csproj<br/> {<br/> [

Access the SQL Command Query Value Property from the OLEDB Container within a Script Task

Hello, I'd like to Access the SQL Command Query Value Property from the OLEDB Container within a Script Task so I can audit the queries which are executing. What is the syntax for this or does anyone have a sample on how to do this? Thank you

Receive/Delete Multiple FTP Files based on condition using SCRIPT(VB) TASK

I am trying to receive and delete multiple FTP files from a remote FTP server using Script task Below is the code   Dim FTPConnMgr As ConnectionManager FTPConnMgr = Dts.Connections("FTP Connection Manager") Dim FTPClientConn As FtpClientConnection = New FtpClientConnection(FTPConnMgr.AcquireConnection(Nothing)) Dim FileTimeStampNew As String = "20100913021807" Dim remoteFileNames(0) As String remoteFileNames(0) = Dts.Variables("FtpRemoteDirectory").Value & "*" & FileTimeStampNew & ".*" 'Below hardcoded FileName works good. But the problem is there are lots of file in the FTP folder that I dont want to receive 'remoteFileNames(0) = Dts.Variables("FtpRemoteDirectory").Value & "Company_alpha_Full_20100913021807.xml" Dim localPath As String = Dts.Variables("FtpLocalDirectory").Value FTPClientConn.Connect() FTPClientConn.ReceiveFiles(remoteFileNames, localPath, False, False) FTPClientConn.Close() Dts.TaskResult = ScriptResults.Success End Sub End Class If i specifically mention the RemotefileNames this works fine but, when I say *.* it executes succefully but doesn't receives the file. Please advice how to receive multiple file based on a variable BR, AWM

script task to insert blank row into excel sheet

<!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor

SSIS Script Task

I am trying get user input from a form created via script but the form flashes on the screen and then disappear...is there a special implementation for this?? The following code is in my main; FormIU   from = new FormIU();   from.Show();    

Error in Script component in the Data Flow Task

Hi, I need a small help. This is what i require. I need to generate a auto increment number using script component and assign it to target column. use db1 go create table src (name varchar(10) ) insert into src select 'A' union all select 'B' union all select 'C'   create table trg (id int, name varchar(10) ) while loading the trg table, i need to generate a auto increment number and then load it to target. Finally, my trg table data should look as follows id name 1  A 2  B 3  C This is what i have done inside the package. step1 : declared a global variable "tmp" of int32 step2 : created a connection manager pointing to "db1" database step3 : drag n drop data flow task step : inside the data flow task , i have the following        OLEDB Source  (select name from src)           |        Script Component (i have added a new Output column "v_id" of int datatype in INPUTS AND OUTPUTS page)           |        OLEDB Destination In the Script page in Script component , in ReadWriteVariables | User::tmp, I have chose Visual Basic 2008 and clicked the EDit script and inside the Editor this and inisde the below routine i have added only two

Insert error description in sysjobhistory from ssis script task

hi. in ssis i have script task that, in some situations, raise error (Dts.TaskResult = ScriptResults.Failure). But in sysjobhistory table there is only shor description what happend (Description: The script returned a failure result.). Is there any way that i can set some system variable to describe what is error so that description ens up in sysjobhistory table? in the end, i want to look in job activity monitor and see that job is "red" and see the description that couses this failure.

Error Trapping in SSIS Script Task

Hi, I am processing a cube partition using an SSIS script task. The script works out the name of the partition which requires processing based on the system date.The problem I have is whenever there is a failure in the processing task the only error I get is that the script task returned a failure result. This is reported by the SQL job that calls the script task and also by SSIS package logging. I am running SQL2005 SP3How can I get my script to return a meningful error? Thanks in advance.

SSIS Script Task

Can I use a script task to recieve two date values to start a SSIS package? if so, how do I implement this?

SSIS - Script task - Web refrerences do not add at first or second attempt

Problem happens on 3 different PC's with BIDS installed.   Steps to reproduce: - New SSIS project - Drop Script Task - Edit its code - Add Web Reference - Specify a web service and click add reference - Close script task code editing window - Open script task code editing window - Reference is gone - But you CANNOT add another reference with the SAME name, it will get "1" at its end! - Try to add same web refernece again, it will have "1" at its end - Close script task code editing window - Open script task code editing window - You have 50% chance for reference to stay, 50% chance that it will disappear AGAIN! - But you now cannot add another reference with name or name1! - Try to add same web reference AGAIN and it will have 2 at its end - Close script task code editing window - Open script task code editing window - I have never got the reference2 to disappear... yet Please can someone just tell me... WHAT THE ... IS HAPPENING?    
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend