Running Access as a Scheduled Task

J

Jean

I'm not sure which newsgroup this problem fits best so
please let me know if it would be better posted in another
newsgroup.

I have an Access 2000 program that I am executing from a
batch file as a Windows Scheduled Task with the following
command line:
"C:\Program Files\Microsoft
Office\Office\MSAccess.exe" "C:\Program
Files\TK_FrontEnd\Data\DTStats.mdb" /nostartup /runtime /cm
d "Import"

I then have an Autoexec macro within Access to read the
cmd argument and do some processing.

The scheduled task works fine if the Windows account
logged on is the one running the task. However, if the
task is run under a different account, Access either opens
(I see the .ldb file appear) and does nothing or Access
never opens at all. Setting Administrator permissions for
the account running the task doesn't seem to make any
difference in the outcome.

Any help is greatly appreciated.

Thanks,
Jean
 
A

Alick [MSFT]

Hi Jean,

We need to change task owner to the different user account (change task
owner) you want the task run as; with the Task Scheduler, each scheduled
task can be configured to run in a different account, however, it can't be
configured to run in more than two different account (including two
accounts) at the same time.

It is the same with all the tasks, not only Access task; I believe other
tasks won't run in the same situation: logging on as another account.

You can post the Windows question to microsoft.public.windowsxp.*
Newsgroup, such as microsoft.public.windowsxp.basics.

Please feel free to reply to the threads if you have any concerns or
questions.





Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Jean" <[email protected]>
| Sender: "Jean" <[email protected]>
| X-Tomcat-NG: microsoft.public.access.modulesdaovba
|
| I'm not sure which newsgroup this problem fits best so
| please let me know if it would be better posted in another
| newsgroup.
|
| I have an Access 2000 program that I am executing from a
| batch file as a Windows Scheduled Task with the following
| command line:
| "C:\Program Files\Microsoft
| Office\Office\MSAccess.exe" "C:\Program
| Files\TK_FrontEnd\Data\DTStats.mdb" /nostartup /runtime /cm
| d "Import"
|
| I then have an Autoexec macro within Access to read the
| cmd argument and do some processing.
|
| The scheduled task works fine if the Windows account
| logged on is the one running the task. However, if the
| task is run under a different account, Access either opens
| (I see the .ldb file appear) and does nothing or Access
| never opens at all. Setting Administrator permissions for
| the account running the task doesn't seem to make any
| difference in the outcome.
|
| Any help is greatly appreciated.
|
| Thanks,
| Jean
|
|
 
J

Jean

Alick,

Thank you for the response. However, I don't understand
what you're suggesting.

As I stated in my original post I am currently trying to
run the task with an account other than the one logged on.
The account I am using to run the task and the account
logged on amounts to 2 accounts.
We need to change task owner to the different user
account (change task
owner) you want the task run as;
What do I need to change the account to?

Thank you,
Jean
-----Original Message-----
Hi Jean,

We need to change task owner to the different user account (change task
owner) you want the task run as; with the Task Scheduler, each scheduled
task can be configured to run in a different account, however, it can't be
configured to run in more than two different account (including two
accounts) at the same time.

It is the same with all the tasks, not only Access task; I believe other
tasks won't run in the same situation: logging on as another account.

You can post the Windows question to microsoft.public.windowsxp.*
Newsgroup, such as microsoft.public.windowsxp.basics.

Please feel free to reply to the threads if you have any concerns or
questions.





Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Jean" <[email protected]>
| Sender: "Jean" <[email protected]>
| X-Tomcat-NG: microsoft.public.access.modulesdaovba
|
| I'm not sure which newsgroup this problem fits best so
| please let me know if it would be better posted in another
| newsgroup.
|
| I have an Access 2000 program that I am executing from a
| batch file as a Windows Scheduled Task with the following
| command line:
| "C:\Program Files\Microsoft
| Office\Office\MSAccess.exe" "C:\Program
|
Files\TK_FrontEnd\Data\DTStats.mdb" /nostartup /runtime /cm
 
T

TC

Jean, please don't MULTI-POST. This is where you post the same question
seperately< to different newsgroups.

When you multi-post, the people reading one newsgroup, can not see any
answers you got in other newsgroups. I have just spent time giving you some
suggestions in one of the other newsgroups to which you posted. I would not
have wasted that time, if I had known that some-one else was already helping
you in >this< newsgroup.

Instead of multi-posting, CROSS-post. This is where you send the same
message >once<, to several newsgroups, simultaneously. You do this by
including >all< the relevant newsgroup names, in the Newsgroups line of your
newsreader, seperated by semi-colons (or whatever). Then, all of the answers
that are given in one newsgroup - say this one - are instantly visible in
all the other groups to which you cross-posted. This is much more valuable
to the general readership of the newsgroups, & is much more considerate of
the people who take time to answer.

Cheers :)
TC
 
A

Alick [MSFT]

Hi Jean,

We need to change the account to the current logged on account to have the
task run successfully.

1. Go to Control Panel->Scheduled Tasks
2. Double click the task to open it.
3. On the Task tab, in Run as text box, change the user account to the
current logged on user account, remember to set the password.
4. Click OK.

I think it is Windows question, to test we can schedule a simple task to
check if it works in the same situation. If it doesn't work like Access
task, you can post the Windows question to microsoft.public.windowsxp.*
Newsgroup, such as microsoft.public.windowsxp.basics.

Please feel free to reply to the threads if you have any concerns or
questions.



Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Jean" <[email protected]>
|
| Alick,
|
| Thank you for the response. However, I don't understand
| what you're suggesting.
|
| As I stated in my original post I am currently trying to
| run the task with an account other than the one logged on.
| The account I am using to run the task and the account
| logged on amounts to 2 accounts.
|
| >We need to change task owner to the different user
| >account (change task
| >owner) you want the task run as;
| What do I need to change the account to?
|
| Thank you,
| Jean
|
| >-----Original Message-----
| >Hi Jean,
| >
| >We need to change task owner to the different user
| account (change task
| >owner) you want the task run as; with the Task Scheduler,
| each scheduled
| >task can be configured to run in a different account,
| however, it can't be
| >configured to run in more than two different account
| (including two
| >accounts) at the same time.
| >
| >It is the same with all the tasks, not only Access task;
| I believe other
| >tasks won't run in the same situation: logging on as
| another account.
| >
| >You can post the Windows question to
| microsoft.public.windowsxp.*
| >Newsgroup, such as microsoft.public.windowsxp.basics.
| >
| >Please feel free to reply to the threads if you have any
| concerns or
| >questions.
| >
| >
| >
| >
| >
| >Sincerely,
| >
| >Alick Ye, MCSD
| >Product Support Services
| >Microsoft Corporation
| >Get Secure! - <www.microsoft.com/security>
| >
| >This posting is provided "AS IS" with no warranties, and
| confers no rights.
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Jean" <[email protected]>
| >| Sender: "Jean" <[email protected]>
| >| X-Tomcat-NG: microsoft.public.access.modulesdaovba
| >|
| >| I'm not sure which newsgroup this problem fits best so
| >| please let me know if it would be better posted in
| another
| >| newsgroup.
| >|
| >| I have an Access 2000 program that I am executing from
| a
| >| batch file as a Windows Scheduled Task with the
| following
| >| command line:
| >| "C:\Program Files\Microsoft
| >| Office\Office\MSAccess.exe" "C:\Program
| >|
| Files\TK_FrontEnd\Data\DTStats.mdb" /nostartup /runtime /cm
| >| d "Import"
| >|
| >| I then have an Autoexec macro within Access to read the
| >| cmd argument and do some processing.
| >|
| >| The scheduled task works fine if the Windows account
| >| logged on is the one running the task. However, if the
| >| task is run under a different account, Access either
| opens
| >| (I see the .ldb file appear) and does nothing or Access
| >| never opens at all. Setting Administrator permissions
| for
| >| the account running the task doesn't seem to make any
| >| difference in the outcome.
| >|
| >| Any help is greatly appreciated.
| >|
| >| Thanks,
| >| Jean
| >|
| >|
| >
| >.
| >
|
 
J

Jean

I already know that it works if the account running the
task is the same account that is logged on. I also know
that other processes that I put in the batch file work
fine when run using an account other than the one logged
on. The problem only occurs when the scheduled task tries
to run the command line in the batch file that executes
Access.

My scheduled task cannot be dependent on a specific
account being logged on when it runs. It needs to run
under the account I assign, whether that is the account
logged on or not.

Jean
-----Original Message-----
Hi Jean,

We need to change the account to the current logged on account to have the
task run successfully.

1. Go to Control Panel->Scheduled Tasks
2. Double click the task to open it.
3. On the Task tab, in Run as text box, change the user account to the
current logged on user account, remember to set the password.
4. Click OK.

I think it is Windows question, to test we can schedule a simple task to
check if it works in the same situation. If it doesn't work like Access
task, you can post the Windows question to microsoft.public.windowsxp.*
Newsgroup, such as microsoft.public.windowsxp.basics.

Please feel free to reply to the threads if you have any concerns or
questions.



Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Jean" <[email protected]>
|
| Alick,
|
| Thank you for the response. However, I don't understand
| what you're suggesting.
|
| As I stated in my original post I am currently trying to
| run the task with an account other than the one logged on.
| The account I am using to run the task and the account
| logged on amounts to 2 accounts.
|
| >We need to change task owner to the different user
| >account (change task
| >owner) you want the task run as;
| What do I need to change the account to?
|
| Thank you,
| Jean
|
| >-----Original Message-----
| >Hi Jean,
| >
| >We need to change task owner to the different user
| account (change task
| >owner) you want the task run as; with the Task Scheduler,
| each scheduled
| >task can be configured to run in a different account,
| however, it can't be
| >configured to run in more than two different account
| (including two
| >accounts) at the same time.
| >
| >It is the same with all the tasks, not only Access task;
| I believe other
| >tasks won't run in the same situation: logging on as
| another account.
| >
| >You can post the Windows question to
| microsoft.public.windowsxp.*
| >Newsgroup, such as microsoft.public.windowsxp.basics.
| >
| >Please feel free to reply to the threads if you have any
| concerns or
| >questions.
| >
| >
| >
| >
| >
| >Sincerely,
| >
| >Alick Ye, MCSD
| >Product Support Services
| >Microsoft Corporation
| >Get Secure! - <www.microsoft.com/security>
| >
| >This posting is provided "AS IS" with no warranties, and
| confers no rights.
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Jean" <[email protected]>
| >| Sender: "Jean" <[email protected]>
| >| X-Tomcat-NG: microsoft.public.access.modulesdaovba
| >|
| >| I'm not sure which newsgroup this problem fits best so
| >| please let me know if it would be better posted in
| another
| >| newsgroup.
| >|
| >| I have an Access 2000 program that I am executing from
| a
| >| batch file as a Windows Scheduled Task with the
| following
| >| command line:
| >| "C:\Program Files\Microsoft
| >| Office\Office\MSAccess.exe" "C:\Program
| >|
|
Files\TK_FrontEnd\Data\DTStats.mdb" /nostartup /runtime /cm
 
A

Amy Vargo

Hi Jean,

My name is Amy Vargo. Thank you for using the Microsoft Access Newsgroups.

Please review the article below which describes how to start Microsoft
Access and open a database by using the schedule service.

230575 ACC2000: How to Start Access by Using the Windows NT Schedule Service
http://support.microsoft.com/?id=230575

Create the sample described in this article, and verify that at least the
sample works when logged in as different users. Please note that you must
log on as a user account that has Administrator rights and that using the
system account does not work correctly. The Office Assistant pops up and
Access stops responding (hangs). Also, the system account does not have a
default printer so, in that case, you could not print reports in Access.

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Amy Vargo
Microsoft Access Engineer


This posting is provided 'AS IS' with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.
 
J

Jean

I have resolved the problem with running my Access program
as a Scheduled Task. I am posting the result here to share
with others.

Part of my problem was a corrupt Office developer
installation.

Once that was resolved, the Scheduled task still did not
run successfully. The problem was with the account I was
using to run the scheduled task. The account had never run
Access so when the scheduled task started the Access
program (while I was logged onto the PC as another user)
Access was waiting on user input for user information
(name and initials). This always occurs the first time
Access is run from a user account.

However, since I was logged onto the PC as another user
when the Access message appeared, the task messages were
hidden from the currently logged on account so the task
just sat there waiting on user input.

The resolution is to log into the PC as the account that
will run the scheduled task. Open Access and respond to
the prompts accordingly. Then close Access and logoff the
account. The scheduled task will now run successfully.

Thanks to everyone for your help.
Jean
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top