One of the benefits of the DocuWare Export Desktop Application, is that you can enable an automatic generation of CSV index-data files.
To enable the automatic generation of the files, DocuWare uses the default tool of the operating system, Microsoft Task Scheduler.
DocuWare Support has validated, with partners and customers, that the Microsoft Task Scheduler can provide diverse challenges with the generation of the CSV files.
Microsoft has created a list of available error codes for Task Scheduler Error and success codes
Please note, that DocuWare Export does not update the error code within Task Scheduler ensure to always additionally check the C:\ProgramData\DocuWare\Logs\Export.log for information on the DocuWare process.
Please follow /knowledgebase/article/KBA-37646 to provide required information to DocuWare Support.
Answer:
This article will collect the most common behaviors, DocuWare Support has been able to observe.
Please keep in mind, that DocuWare might not be able to assist & resolve the underlying behavior, as Task Scheduler is a Microsoft application / product!
Ensure using a domain user account for all scheduled processes
During investigations, we have concluded, that the user operating the task always has to be a domain user account.
If the user is only a local windows account, the scheduled operation can fail / not run when the user isn't authenticated to the machine.
Attention: Before following the next steps, ensure that you have the password for the Windows user, which will run / execute the task. This password has to be entered after modifying the properties!
You can verify / set the domain user by following the below steps:
- Open the task properties of the DocuWare Export task
- In the "General" tab, go to the button "Change User or Group..."
- Within the next window, ensure to select the correct Windows domain (Location) (contact your internal Windows Administrator if you don't know which domain to select)
- In the field insert the name of the Windows user, e.g. "Administrator"
- Click the button "Check Names" - Verify that the user has received the domain prefix to his name, e.g. "YourDomainName"\Administrator
- Click OK
- Click OK on the "General" tab window and enter the password of the Windows domain user
Task Scheduler - "do not store password option"
When trying to execute DocuWare Export in an automated way, ensure that the following option has been deactivated / not selected!
With the setting below, the task won't run, as the domain user can't authenticate.
Please contact your internal Windows administrator to check for existing security policies (GPO) regarding Windows users.
Log on as batch job - user right for running tasks without user-context
The windows (domain) user should have the permission "Log on as batch job". Without this right, the execution / start of the DocuWare Export application via Microsoft Task Scheduler will fail!
DocuWare Support has evaluated the following articles to be helpful for Microsoft Administrators:
- Log on as a batch job - Windows 10 | Microsoft Learn
- Log On as Batch Job Rights: How to Grant Access | Brooksnet
If this right wasn't granted to the Windows user, the scheduled task will run into the error "0x0004131C", please refer to the Microsoft documentation for more details: Error and success codes
How-To test Task Scheduler configuration with low impact and effort
- Create a data-record (via document tray) or store a dummy document in your file-cabinet (used in DocuWare Export process)
- Use the search dialogue to find the fresh data-record / dummy document
- Copy the Document ID from the system entries or if enabled from the system field in the result-dialogue
- Open the DocuWare Configuration page and navigate to Export-Data
- Now select the DocuWare Export configuration and modify the filter to include the previously copied / remembered Document ID (DWDOCID)
- Modify the Task Scheduler settings to execute the task, e.g. 5 minutes into the future
- Example you are authenticated, and it is 10 AM schedule the task to execute at 10:05 AM
- Log off with the authenticated user
- Grab a tea / coffee ;)
- Authenticate with your Windows user and verify, if Task Scheduler has updated its last execution time, check Export.log and check the data-record / dummy document in the file-cabinet
- Optionally delete the data-record / dummy document and the generated file from DocuWare Export
If the DocuWare Export was unsuccessful, please check other details mentioned on this page.
Credential Manager - DocuWare Export local authentication token
With the introduction of OAuth2 the Desktop Apps have received so-called refresh tokens. These tokens are required for accessing the DocuWare system.
The token for DocuWare Export is stored in Credentials Manager. Credential Manager in Windows - Microsoft Support
You might be impacted by the following error within Export.log
This message indicates, that the Windows user, might not have privileges to access / write to Credentials Manager. Check "Ensure using a domain user account for all scheduled processes", further up in this article.
A further check can be made within the default folder for all DocuWare Export Tasks (C:\Windows\System32\Tasks\DocuWare). Here you can find the Task configuration files (XML files).
The user defined should have the Windows domain-prefix set in all XML fields related to the Windows user.
Attention: Windows Task Scheduler won't always show the domain-prefix. After applying the domain user and opening the Task Scheduler the next time, you will only see the name of the user...
Writing to mapped network drives
When writing to network drives, please validate, if the user has enough permissions to write to the target folder. Furthermore, please keep the following in mind:
Mapped network drives are mapped in the context of a user session! You should use the UNC path of the share instead (\\server\share), as this should work in both contexts (as long as the share is accessible to the user under which the scheduled task is running). |
Additional information can be found in the dedicated article /knowledgebase/article/KBA-37616
Should you have validated the permissions and writing is still not possible, you might have to follow the workarounds provided here: Mapped drives are not available
Task scheduler does not log last execution
In some cases, Microsoft Task Scheduler doesn't update the "last execution" time. The next run time is correctly updated.
This behavior is an indication that something generically is wrong with the instance of Task Scheduler / Windows.
DocuWare Support can't guarantee that the following steps will resolve the issue. Please contact your system administrator / service provider:
- Validate your Windows system: Use the System File Checker tool to repair missing or corrupted system files - Microsoft Support
- Delete the file within "C:\Windows\System32\Tasks\Microsoft\Windows\Defrag"
If the above-mentioned fails to remedy the behavior within Task Scheduler, the following workarounds can assist:
- Write a .bat file to call DocuWare Export and configure an alternative scheduling mechanism on your Windows server / Windows machine (please consult your windows' administrator)
- Move DocuWare Export to a new Microsoft server and set up the scheduled task there (please consult your administrator / service provider)
Multiple "OpenWith" entries in Task Manager
We have received inquiries about the behavior "OpenWith". This is a Microsoft behavior, which can occur if the default program can't be automatically applied.
Please contact your internal Windows Administrator and ask him / her for assistance. Related information can be found below:
- Pick an app process flood (OpenWith.exe) - Microsoft Community
- The Windows Process Journey — “OpenWith.exe” (Pick an App) | by Shlomi Boutnaru, Ph.D. | Medium
Authenticating to DocuWare Export shows localhost address in the browser window
When opening DocuWare Export you are forced, to authenticate within the opening browser window. In some cases, you will see an address pointing to "localhost:[port]". DocuWare is currently investigating the cause, and it will be fixed in upcoming versions.
The localhost address refers to the local Oauth2 refresh token. The token is stored within Credentials Manager (Credential Manager in Windows - Microsoft Support).
Should the mentioned behavior prevent you from running the task with Task Scheduler, follow the provided steps:
- Clear your browser cache, details can be found in article /knowledgebase/article/KBA-36923
- Delete the refresh token from DocuWare Export within Credentials Manager (see following example)
- Delete the task within Task Scheduler
- Restart the Desktop Apps Service
- Follow the steps from /knowledgebase/article/KBA-36581 and create the task again