none
Task Scheduler with Excel RRS feed

  • Question

  • Dear users,

    We use the Task Schedular for Excel to make a report. To make this report working we have an add-in within Excel.
    But when we schedule this task and we run it with the following option: Run only when user is loggod on
    Then the report gets well sended to my mailbox and the task complete successfully.

    But when I use the option: Run whether user is logged on or not
    Then the report isn't working and I see the following process keeping open instead of closing: EXCEL.EXE*32
    The CMD.EXE to launch Excel starts successfully and also closes and The EXCEL.EXE*32 keeps open.
    In the Task Scheduler I see that the task is Task Completed, but this isn't the case.

    Now I was wondering the following:
    Is this report not working because when I set the task to run in the background the proces change to Network Service or System and those accounts do not have the Excel add-in.

    I hope that someone has experience with this, since I can find a lot about the task scheduler online and I know how to get it working without Excel.
    Since we have some task already running in the background, but this problem I'm currently having is giving me a lot of problems.

    Specifications
    Windows Server 2008 R2 Enterprise
    Excel 2010

    Kind regards,
    Martijn

    Wednesday, November 7, 2012 2:04 PM

All replies

  • Don’t know how is your task configured and how it works with the Excel add-in. Make sure the user account running the tasks has permission to the batch file and any network shares and make sure you use the full UNC path of the share. Then pick "Run whether user is logged on or not" and check the "Run with highest privileges" checkbox.
    Friday, November 9, 2012 6:13 AM
    Moderator
  • Dear Cheers ZHANG,

    Thank you for your reply, first I thought no one had any information for me but there you came.

    I will explain all the options how I have done them for this task:

    General tab
    - Account: SVC_IT (domain account)
    - Run whether user is logged or not
    - Run with highest privileges
    - Configure for: Windows 7, Windows Server 2008 R2

    Trigger
    - No information filled in

    Actions
    -
    Action: Start a program
    - Program/Script:
    E:\Martijn\Planning-MA-WD.bat
    This is because when I fill in the UNC path, it automatically sets the path to the directory.
    This probably because the batch file is on the same server as the task.

    Condition
    - None adjustment made in this section

    Settings

    - None adjustment made in this section

    Batch file information:
    -
    Name: Planning-MA-WD.bat
    - Text in the batch file:
    @echo off
    start E:\Martijn\"planning-MA-WD.xls" /w
    exit

    Other information
    - Within the excel is like I sayed an add-in, also there are within the excel 2 VBA scripts that are running
    I hope you have something on this information and could help me any further
    -
    The SVC_IT account has full right on the map Martijn, this is the map where the 2 files are located. On the both files the SVC_IT has full access.

    Kind regards,
    Martijn


    • Edited by MrMojito Friday, November 9, 2012 2:15 PM Grammer / Adjustment in text
    Friday, November 9, 2012 2:11 PM
  • Dear users,

    Is there anyone who can help me with this one or have any idea's or tips to make this working?

    Kind regards,
    Martijn
    Wednesday, November 14, 2012 9:25 AM
  • In case someone else runs into this thread, there is a long discussion related to this topic at https://social.technet.microsoft.com/Forums/windowsserver/en-US/aede572b-4c1f-4729-bc9d-899fed5fad02/run-powershell-script-as-scheduled-task-that-uses-excel-com-object?forum=winserverpowershell that is broader than just PowerShell.
    Monday, November 2, 2015 9:38 PM