Solved

Schedule Task at window 2000?

Posted on 2004-08-22
11
143 Views
Last Modified: 2010-05-02
Hi All,

I have used Visual Basic 6.0 to develop a window application before. Now I would like to schedule this application to run at 1:00am everyday.

I know I can do this by adding a schedule task by using "Scheduled Tasks" at control panel.

But I found the application can work only after logging the OS.
I want the application can be run properly if I have power on my PC without log in.

How can I solve this problem?

If I run my application as a service, can this solve my problem?
Can a service be scheduled to run periodically?

Please advice. Thanks!

0
Comment
Question by:cplau
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
11 Comments
 
LVL 7

Expert Comment

by:suramsureshbabu
ID: 11867524
Idealy the program would be designed to run as a service, but not all of them are. You have to be carefull with this however. Not all programs run well as a service - VB apps for example are not recommended to be run as a service.
There is a utility called srvany that will probably work for you. It is available as a download at Microsofts web site

0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 11870092
Your application should normally be running even if you are not logged in. A mistake often done by programmers is that resources (mapped drives, printers, ...) are not available when not logged in.

Start by creating an application that does nothing and schedule it. You should see that the application will be launched. Then add your code to this application with a lot of tracing (wrtiting to a .log file on the C: drive) to know exactly where the application is going and where it is stopping.
0
 

Author Comment

by:cplau
ID: 11877262
Hi All,

If I run my application as a service, can I schedule it to run periodically?
I know I can use Scheduled Task to run an exe file periodically. How about a service?

Thanks!
0
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
LVL 70

Expert Comment

by:Éric Moreau
ID: 11880849
A service is yet another thing and have more  limits! Also, Windows Services should be written in VB.Net to be easier.

0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 11880852
Did you trace your application yet?
0
 

Author Comment

by:cplau
ID: 11888566
Dear emoreau,

My application needs to use a network drive.
Can I map a network drive without log in the OS?

Further, please advise whether a service can be scheduled or not?
Thanks!

0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 11888673
>>Can I map a network drive without log in the OS?

If you can give credentials.

can't you use a URN: \\servername\sharename\folder\
0
 

Author Comment

by:cplau
ID: 11904119
Dear emoreau,

Could you give me the source code to use URN to map a network drive?

Thanks!
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 11904148
0
 

Author Comment

by:cplau
ID: 11915390
Dear emoreau,

The most important question:

A service at window 2000 can be scheduled to run at a specified
time or not?

Thanks!
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 200 total points
ID: 11915546
Not a service. Only an application.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month6 days, 22 hours left to enroll

623 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