cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

Cron Schedule like 0 58/30 6,7,8,9,10,11,12,13,14,15,16,17 ? * MON,TUE,WED,THU,FRI * does not work

saberw
New Contributor

when we use this cron schedule: 0 58/30 6,7,8,9,10,11,12,13,14,15,16,17 ? * MON,TUE,WED,THU,FRI *

so far only the 58th minute will run, but not the 28th minute (30minutes after 58th minute). Is there some kind of bug in the cron scheduler?

Reference: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html 

1 REPLY 1

Kaniz_Fatma
Community Manager
Community Manager

Hi @saberw , 

The cron schedule you provided is 0 58/30 6,7,8,9,10,11,12,13,14,15,16,17 ? * MON,TUE,WED,THU,FRI *. This schedule specifies that a task should run on weekdays (Monday to Friday) between 6 AM and 5 PM. The task should start at the 58th minute of the hour and then every 30 minutes after that.

Let's break down the components of the cron schedule:

  • 0: Specifies the second field, indicating that the task should start at the 0th second of the minute.
  • 58/30: Specifies the minute field. It means the task should begin with the 58th minute and then every 30 minutes afterwards. So, the task would run at 6:58 AM, 7:28 AM, 7:58 AM, and so on.
  • 6,7,8,9,10,11,12,13,14,15,16,17: Specifies the hour field, indicating that the task should run between 6 AM and 5 PM.
  • ?: This field is used in Quartz Scheduler to specify the day of the month. Since you're interested in running the task on weekdays, this field is set to meaning "no specific value."
  • *: Specifies the month field, meaning the task can run any month.
  • MON,TUE,WED,THU,FRI: Specifies the day of the week field, indicating that the task should run from Monday to Friday.

Given this schedule, the task should run at 6:58 AM, 7:28 AM, 7:58 AM, and so on, on weekdays between 6 AM and 5 PM.

Suppose you're experiencing issues where the task is not running as expected. In that case, it might be worth checking the configuration of your scheduling system to ensure that the cron expression is being interpreted correctly. If you're using Quartz Scheduler, ensure that you're using a version that supports the cron word you provided and that there are no misconfigurations in the scheduling setup. If the issue persists, raise a support ticket with Databricks.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group