473,385 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to run VB from the Windows Task Scheduler?

dsatino
393 256MB
Basically, all of my Front-end apps check to make sure that the backend data is up-to-date and, if not, launch the code to update the data. I'm going to keep this functionality, but I'd prefer it to be nothing more than fail safe.

Basically, I just need an example of how to run the code from the Windows Task Scheduler.

Thanks.
Jan 20 '11 #1
4 3006
ADezii
8,834 Expert 8TB
I haven't tested this, but Have the Scheduler Open an Access Database at the appointed time. This DB will consist of nothing but an AutoExec Macro which will Call a Function that does all the work of Updating. The Function then Quits the DB when it has done its work.
Jan 20 '11 #2
dsatino
393 256MB
Do you have any experience setting up the task scheduler itself?
Jan 20 '11 #3
ADezii
8,834 Expert 8TB
Not really.
Jan 20 '11 #4
beacon
579 512MB
I usually write VBScripts that back up my databases that I use in Windows Task Scheduler. You may be able to do something similar (as ADezii suggested), if you're interested, where you have the VBScript open the database at a time when it won't be in use and have it run for a certain amount of time to ensure that the data has been updated, then close the database and end the script.

I also have a subroutine that emails me everyday to let me know that the task was completed. I'm happy to share this with you if you'd like.

All you have to do is put the script somewhere that can be accessed on your network, if you're running on a network, that doesn't require mapping a drive (I suggest the Temp folder), then create a new scheduled task, browse to find the script, then set the recurrence (daily, weekly, etc.). If you're on a network, you'll have to open the task after you create it and enter your login credentials in the task. If your network requires periodic changing of your password, you'll have to change the password on the task every time you change your login password. That's why I use the email subroutine...so I'll know if I forgot to change my password in the script.

Let me know about the script. Otherwise I hope this helps and good luck,
beacon
Jan 23 '11 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Faiz | last post by:
We have developed an application in VB6 (say AA.exe). We wish to schedule the execution of this application (AA.exe) through Windows Task Scheduler. Is there a way through which we can add this...
3
by: Tim Marsden | last post by:
Hi I wish to write a task scheduler in my application. What is the best way to do this? Do I use the windows scheduler or try and write my own.? Is a timer checking every second feasible.? ...
4
by: Christina | last post by:
Dear All, How can I pop up the windows task scheduler inside of my .net application? Such as I have a button called Schedule Now, after clicking it, the Add Scheduled Task window will pop up,...
2
by: Kevin | last post by:
Hi, I am looking for a Task Scheduler with source code that has the following features: - Must perform all of the same functions as the Windows Task Scheduler - Must be able to run COM...
9
by: chandru.govind | last post by:
Hi, I built a C# application that scans a folder and pops up a form if there are any files present in the folder. I have scheduled this as a task to repeat every 1 min using the windows task...
7
by: Shane Story | last post by:
Have an app and would like to allow easy addition of MYAPP.EXE /F /P (for example) my prog with command line args, as a job to be run. Would like to make it easier on the user to run the app. ...
3
by: mayur_hirpara | last post by:
Hi, I am writing a VB.NET application. It is a Windows application at the moment. The application contains a button. the click event of button perform a long running task. It needs to be started...
1
by: =?Utf-8?B?U3Jpaw==?= | last post by:
Hi, I have a console application which needs to be run at periodic intervals. So, I want to add it in Windows Task Scheduler but at the same time, I need to pass parameters to the Application...
1
by: skennd | last post by:
Hello, All your help is appreciated in this problem. I am running a macro to execute certain queries and the macro is started to run by a windows task scheduler. However, after the macro runs...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.