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

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?

LVL 1
dba123Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

grayeCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dba123Author Commented:
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
grayeCommented:
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
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

dba123Author Commented:
I have my console app working...just don't know how to compile into an exe
0
dba123Author Commented:
it is working when I run my .vb code in debug.  Here's the code:

http://www.webfound.net/wholecode.txt
0
grayeCommented:
So, dig the *.exe file out of the Debug directory, install that on the server
0
dba123Author Commented:
how do I install it on the server...?
0
grayeCommented:
Most .Net application don't require any installation... so just copy the file to the server
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.