Troubleshooting task scheduler issues
Windows Task Scheduler¶
There are two implementations of the Windows scheduler present:
- CLI-based (Legacy): uses
schtasks.exeto communicate with the scheduler; sensitive to locale-dependent data, such as Unicode names and date-time format. - COM-based (New): uses COM API to communicate with the scheduler; more flexible and provides more features than the CLI version.
COM-based implementation is used by default, starting from the 21.1 version of DBeaver EE.
Excluding legacy Scheduler¶
If you encounter an error in Windows which contains the following text: com.sun.jna.platform.win32.COM.COMException,
do the following:
-
Open the file
dbeaver.ini.Tip
Detailed instructions on finding
dbeaver.iniare available in our article. -
Place the line
-Ddbeaver.scheduler.windows.legacy=truebelow the-vmargsline.
Windows Task Scheduler - incorrect date format¶
Applicable to legacy Scheduler¶
If you encounter an error in Windows which looks like this:
ERROR: Invalid Start Date (Date should be in %some_format% format).
do the following:
- Open the file
dbeaver.iniin the directory with your DBeaver installation - Place the line
-Ddbeaver.scheduler.windows.dateFormat=%some_format%(where %some_format% is a format from the error message) below the-vmargsline.
This flag is available starting from the 7.3.4 EA version of DBeaverEnterprise and might be removed in the future.
MacOS¶
Unable to read or write to crontab¶
When scheduling tasks on macOS 10.15 or newer versions, the OS will prompt you to elevate Team Edition's permissions to administer your computer.
If you do not grant these permissions, Team Edition will fail to schedule your tasks with an error Unable to read or write to crontab.
To bypass this, simply restart Team Edition and try to schedule the task again. The operating system will prompt you to elevate the permissions again.
If macOS never prompted to do that in the first place, you could grant Full disk access permissions in the macOS settings. Here is how to do that:
- Open
System Preferences - Click on
Security & Privacy - Choose the
Privacytab - Choose the
Full Disk Accessfolder - Unlock the preferences lock to the bottom if it is locked
- Click the + button
- Select DBeaver in the file picker that opens
- Click
Open - Close the lock