Skip to main content

Tenant Time Zone for Cron Scheduler

Goal: Functional

Developer: Hengsin (talk)

Feature Ticket: IDEMPIERE-5093

Description:

Add option to support the scheduling of cron pattern scheduler with tenant time zone instead of server time zone.

Changes:

  • Added Timestamp With Time Zone data type reference. 5093 TimestampWithTimeZoneReference

Timestamp With Time Zone

  • Added example usage at Test window. The field uses tenant time zone if set, otherwise it falls back to the detected browser time zone. There's suggestion to add user level time zone preference but that's not implemented in this ticket. 5093 TimestampWithTimeZoneField

Timestamp With Time Zone Field

  • Added Time Zone data type reference. It is a text data type to store Time Zone id. 5093 TimeZoneReference

Time Zone data type reference

  • Context Menu for Time Zone field. The context menu will show the auto detected browser time zone id. 5093 TimeZoneFieldContextMenu

Time Zone field context menu

  • Drop down list for Time Zone field show the list of all supported standard Time Zone ids. User can also choose to enter custom Time Zone id in the format of GMT<+/-><hour offset>:<minute offset> (for e.g GMT+03:00). 5093 TimeZoneFieldDropDown

Time Zone field Drop Down List

  • Added time zone field to Tenant Info (AD_ClientInfo.TimeZone). When set, cron scheduler will use this instead of server time zone. 5093 TenantTimeZoneField

Tenant Info Time Zone field

  • Change AD_Scheduler.DateLastRun and AD_Scheduler.DateNextRun column to Timestamp With Time Zone type. 5093 SchedulerDateFields

Scheduler timestamp with time zone fields

  • Added #clientInfo_timeZone environment context - store the auto detected browser time zone id

Change on Schedule behaviour

Before this ticket when you had a schedule configured to run at 9AM, the job was executed at 9AM of the server timezone.

This ticket changed this behavior and now the job is executed at 9AM of the tenant timezone where the job is defined.


Source: Wiki