Skip to content

Troubleshooting task scheduler issues

Windows Task Scheduler

There are two implementations of the Windows scheduler present:

  1. CLI-based (Legacy): uses schtasks.exe to communicate with the scheduler; sensitive to locale-dependent data, such as Unicode names and date-time format.
  2. 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:

  1. Open the file dbeaver.ini.

    Tip

    Detailed instructions on finding dbeaver.ini are available in our article.

  2. Place the line -Ddbeaver.scheduler.windows.legacy=true below the -vmargs line.

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:

  1. Open the file dbeaver.ini in the directory with your DBeaver installation
  2. Place the line -Ddbeaver.scheduler.windows.dateFormat=%some_format% (where %some_format% is a format from the error message) below the -vmargs line.

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:

  1. Open System Preferences
  2. Click on Security & Privacy
  3. Choose the Privacy tab
  4. Choose the Full Disk Access folder
  5. Unlock the preferences lock to the bottom if it is locked
  6. Click the + button
  7. Select DBeaver in the file picker that opens
  8. Click Open
  9. Close the lock