Results 1 to 5 of 5
  1. #1
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    486

    access not running properly as scheduled task

    I have an access database that runs as a scheduled task. It is set to open a form on open and that form has several tasks that run when it opens and then it closes the database. This has been working fine for over a year. This weekend it upgraded from server 2012R2 to server 2019 and it is no longer working properly. There have been no changes to the access file or the task scheduler. It opens but it doesnt end up doing anything and I am not sure where it is hanging up because if I manually open it , then it runs fine.



    It is set to run whether or not it is logged in
    it is set to run as an admin level user

    The task part is fine, it just doesn't seem to work now even though the task starts up fine. It does not show anything odd in the history

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Did anything get altered with respect to Trusted Locations because of the upgrade? If not, why not just re-create the task under the new server and see if that fixes it? It may be that a file or token needed to authenticate the user is no longer present. IIRC, that would not be the case when you open the db with your OS credentials as the logged on system user credentials are passed from one app to another. Could be a different issue when TS is used to open the db, especially if you're not logged on.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Check that the paths of the Access program or your database haven't changed

    Try logging each step using a series of message boxes or by exporting lines of text to an external log file
    Run the scheduled task manually to test it.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #4
    tagteam is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    486
    Path to program etc are all correct. I have tested by just opening it manually and it still works fine. The only thing that doesnt work is starting it with task manager. I had all the code in vba and had a form auto open and then had on open event.

    Today I moved everything to a macro called AutoExec to see if that may work. The only problem i am facing is trying to run this from the macro

    Shell "cmd /c ""E:\OneDrive - TCIX\TracingFiles\SaveImportedFilesChangeDir.bat"" , vbHide"

    I put it in a function like this
    Function SaveCSVFiles()
    Shell "cmd /c ""E:\OneDrive - TCIX\TracingFiles\SaveImportedFilesChangeDir.bat"" , vbHide"
    End Function

    but i got the message: The expression you entered has a function name that database cant find" So i have put public in front of it and I will test it running by the task scheduler tomorrow and update this thread.

  5. #5
    Gicu's Avatar
    Gicu is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Is that a path to a real OneDrive location? I would not expect that to work in no one is logged on the server as OneDrive would not be available (but you say it worked like this for a year...).
    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 01-21-2016, 05:26 PM
  2. Replies: 3
    Last Post: 04-11-2014, 05:54 PM
  3. Windows XP Scheduled Task
    By markgroupMI in forum Programming
    Replies: 1
    Last Post: 11-01-2013, 07:48 AM
  4. Replies: 3
    Last Post: 06-20-2013, 08:57 AM
  5. Replies: 4
    Last Post: 08-25-2012, 10:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums