Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to schedule VB.NET console (.vb) to run via Scheduler

Posted on 2006-03-23
8
Medium Priority
?
516 Views
Last Modified: 2012-06-27
1) Does anyone have a good article or tell me quickly how to run my VB.NET console .vb code using Windows Scheduler?

I tried to create a sheduled task on the server, browse to the .vb file and run...it failed to run.  Not sure if it's my code or how I'm setting up the scheduled task.  The username and password to run is fine that I setup in the task properties.

2) Also, being that this is not an aspx app, can I still create an aspx page with a button to hook up to my console app to run manually if required?

0
Comment
Question by:dba123
  • 4
  • 4
8 Comments
 
LVL 41

Accepted Solution

by:
graye earned 2000 total points
ID: 16280986
The task scheduler is gonna wanna see a real *.exe file (a valid executable file).... not a *.vb (text file).

Most programs that are written to run under the task scheduler are "Console Application" (not Windows Forms, or web-based applications).  They are typically written with no under interaction (no forms, no buttons, no msgbox, etc).

I'd suggest that you start with a new Console-based application, compile it to an *.exe file, copy it to the server, then create the scheduled task to execute it
0
 
LVL 1

Author Comment

by:dba123
ID: 16281119
yea, I see.  I know in the past at least with asp I was able to run it with an exe.  Can you step me through compling this into an exe since I've never done it before...
0
 
LVL 41

Expert Comment

by:graye
ID: 16281918
Let's start with a simple walkthru for creating a VB.Net-based Console application

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/tsptBuildCommLineApp_SV01074501.asp

This link is kinda specific to Sharepoint, but the concepts are the same...

To compile the program, you just click on the "Build/Build Solution" menu
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Author Comment

by:dba123
ID: 16282284
I have my console app working...just don't know how to compile into an exe
0
 
LVL 1

Author Comment

by:dba123
ID: 16282290
it is working when I run my .vb code in debug.  Here's the code:

http://www.webfound.net/wholecode.txt
0
 
LVL 41

Expert Comment

by:graye
ID: 16284862
So, dig the *.exe file out of the Debug directory, install that on the server
0
 
LVL 1

Author Comment

by:dba123
ID: 16297223
how do I install it on the server...?
0
 
LVL 41

Expert Comment

by:graye
ID: 16297520
Most .Net application don't require any installation... so just copy the file to the server
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Integration Management Part 2

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question