Task Scheduler BAT file or Not

jarett

Board Regular
Joined
Apr 12, 2021
Messages
165
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Trying to schedule Access to open up every day at a certain time. When I go straight to the db file and open it my AutoExec macro runs and exports the file I specificed. However when I run the task in the task scheduler it opens access and gets to the export and errors. It says file path unknown make sure path is connected to the network. I was trying to go a bat file way but getting stuck?
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Where is it trying to export the file to?
On the computer it is running from, does it have rights to that exact path (under whatever user you are using on the Computer when running Task Scheduler)?
 
Upvote 0
Yes, it is on the computer I am running from, well not the actual computer but a drive on our network. I read a few articles saying the "Run only when user is logged on" needs to be checked and I did that.
This is the error.
1619455910690.png
 
Upvote 0
From the server as the logged on user, are you able to browse to that database from File Explorer and open it up?
What happens if you try using UNC naming convention instead of drive letter "M"?
 
Upvote 0
I messed something up, now I'm getting. I must of did something when trying to run a batch.
1619456243372.png
 
Upvote 0
Are you trying to run a batch file from the Scheduler, or open the database directly from the Scheduler?
Is Microsoft Access installed on your server?
 
Upvote 0
Originally I was trying to open database from the scheduler, it would open access but not the database. Update in middle of post, had to recreate db and tried saving the db on the "C" drive and still export file to server. Now task scheduler works and the AutoExec runs smoothly. Not sure if this is best practice but it works for me.
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,871
Members
449,054
Latest member
juliecooper255

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top