|
Run the Z-Cron Service with a User Account
Z-Cron can be installed as a Windows system service. In this mode, Z-Cron runs in the background, even if no user is logged on to Windows. By default, a Windows service often runs under the LocalSystem account. This account has extensive rights on the local computer. However, there may be situations where these rights are not sufficient or not suitable.
This mainly applies to access to:
• Network shares
• Network drives
• Certain folders with special permissions
• Programs that require user rights or a user profile
• Resources in a Windows domain
In this case, the Z-Cron service can be configured to run under a specific Windows user account instead of LocalSystem.
Important
A Windows service is not simply started "as administrator" like a normal program. Instead, a user account is assigned to the service. If Z-Cron requires administrative rights, this user account must have the required permissions. In most cases this means:
• The account is a member of the local Administrators group.
• The account has access to the required folders and network shares.
• The account has the Windows right "Log on as a service".
Change the Z-Cron Service Account
1. Open the Windows Services management console.
Press Windows key + R, enter services.msc and confirm with OK.
2. Find the Z-Cron service.
3. Open the service with a double click.
4. Switch to the "Log On" tab.
5. Select the option "This account".
6. Enter the desired Windows user account.
Local account:
.\UserName
Domain account:
DOMAIN\UserName
7. Enter the password for the account.
8. Confirm the entry.
9. Restart the Z-Cron service.
Only after the restart will the Z-Cron service run under the newly assigned account.
Right "Log on as a service"
To allow Windows to start a service under a specific user account, this account must have the right "Log on as a service". In many cases, Windows assigns this right automatically when the service account is configured. If the service does not start afterwards, this setting should be checked.
1. Press Windows key + R.
2. Enter secpol.msc and confirm with OK.
3. Open:
Local Policies
User Rights Assignment
4. Open the entry:
Log on as a service
5. Add the user account if it is not listed there.
6. Save the change.
Note for Domains
On computers in a Windows domain, these rights may be controlled by Group Policy. In that case, a local change may have no effect or may be overwritten later. The responsible domain administrator must then configure the setting in the domain policy.
Typical Causes if the Z-Cron Service Does Not Start
• The password for the user account is incorrect.
• The account does not have the right "Log on as a service".
• The account has been disabled.
• The password has expired.
• The account is not a member of the local Administrators group, although administrative rights are required.
• A Group Policy prevents logon as a service.
• The service was not restarted after the change.
Typical Causes if a Z-Cron Job Does Not Work
• The service account has no access to the required folder.
• The service account has no access to the network share.
• A network drive was only mapped in the logged-on user account.
• The program expects settings from a user profile that does not exist for the service account.
• Firewall or security software blocks access.
• The program requires a visible user interface but is running in the background service.
Important for Network Drives
Windows services normally do not see the drive mappings of a logged-on user. A drive such as Z:\ may exist for the logged-on user, but may still not exist for the Z-Cron service. For services, use UNC paths whenever possible.
Example:
\\Server\Share\Folder
If a specific network drive is required, it must be made available separately for the service.
Security Note
If possible, use a dedicated user account for the Z-Cron service. This account should only receive the rights that are really required for the scheduled tasks. If the account is a member of the Administrators group, the password should be protected carefully. Do not use this account for normal daily work on the computer.
|