Sage 100

 View Only
  • 1.  VI Job says it's running from schedule but not executing.

    Posted 06-25-2021 09:43
    I have an export job that is supposed to drop a flle in a folder. It runs as expected from within Sage. I added the job to task scheduler, and while the logs indicate the job is running successfully, the file is not being generated. I attached the code I see in the task scheduler in Windows and it does not look complete to me.

    -MN "C:\Sage\Sage2019\MAS90\SOA\swzurl" -ARG "windx:\\\\SY_TaskLauncher.M4P^KRONOSERUPDATE^"

    ------------------------------
    Jim Fuller
    Velosio LLC
    ------------------------------


  • 2.  RE: VI Job says it's running from schedule but not executing.

    Posted 06-26-2021 07:26
    Have you tried running the script outside of task scheduler to make sure that works? Also - check on the activity log in sage to see if the Job is logged in there as running - this will tell you if it is making that far.

    If so, on the task scheduler job, make sure you have run with highest privileges checked, you are running as an admin and that you have the box checked to run whether logged in or not.

    Hoped that helps.

    Sent from my iPhone




  • 3.  RE: VI Job says it's running from schedule but not executing.

    Posted 06-26-2021 07:37
    Also, not sure if this applies so just general info - it does not appear that you can run a task from Windows task scheduler which uses the desktop ( ie a window appears as it runs ).

    I inherited a customer who had several such jobs and we need to leave an account logged in or jobs that pop up with some type of ui while run - even if you don’t need to provide parameters - weren’t running.

    You should be able to spot if this is an issue by checking the task’s log.

    ---------------------------------
    Wayne Schulz - Schulz Consulting - 860-516-8990
    ---------------------------------





  • 4.  RE: VI Job says it's running from schedule but not executing.

    Posted 06-26-2021 15:07
    Edited by Alnoor Cassim 06-26-2021 15:09

    Several things:
    1. What version of Windows Server? Also, what version of Sage and is it Std, Adv, or Premium?

    2. What is the FULL command line you see in Windows Task Scheduler? The portion of the command line you copied is correct.

    3. *** For your export job output file AND the the beginning portion of your command line, is either based on a UNC path, mapped drive path, or a local drive path? If mapped drive, change it right away to UNC as it's unlikely the Task Scheduler user will have the same drive mapping:

    4. In the Windows Task Scheduler:
    a. Find the scheduled task then go to the History tab to see when the job started and ended. Look for errors there.
    b. *** Look where it says "When running the task user the following user account".
    Is that set to NT Authority\SYSTEM or some other local server account? That will not work if using UNC from above so change it to a domain account. 
    c. Several times I've found it's necessary to check the box for "Run with highest privileges"

    5. If none of the above work, you can create a new scheduled task using the Autorun command line, the type you see here - KB 19387



    ------------------------------
    Alnoor Cassim

    Email: alnoor@asifocus.com
    Ph: 949-689-9887
    Orange County, CA
    ------------------------------



  • 5.  RE: VI Job says it's running from schedule but not executing.

    Posted 06-28-2021 09:52
    Thanks for the feedback on the possible issues.  Jim is out this week and likely unable to reply.  I will be jumping into the mix and reviewing the possible fixes with the comments above.

    ------------------------------
    alan niergarth
    Velosio LLC
    ------------------------------



  • 6.  RE: VI Job says it's running from schedule but not executing.

    Posted 07-01-2021 11:57
    so update on this error  Solution ID: 59165  - seems to be the issue we have.  

    Error: "This module cannot be accessed until a company is selected" when running Task Scheduler

    Resolution

    <content>
    1. Open Library Master, Main, User Maintenance
    2. Select the affected User Lognon. On Preferences tab verify that the Prompt for Company Code check box is unchecked.
    3. Open Library Master, Utilities, Data File Display and Maintenance
    4. Browse to MAS90\MAS_System\SY_Company.M4T
    5. Select the Key Scan and search for the company name. On the selected company record make note of the CompanyKey$ field (ex. 0000000001)
    6. Browse to MAS90\MAS_System\SY_System.M4T, click Edit and change field 18 DefaultCompanyKey$ to the value found in SY_Company.M4T
    </content>


    ------------------------------
    alan niergarth
    Velosio LLC
    ------------------------------