Wasim's Site

Liferay Quartz Cron Expression Builder

Build Quartz cron expressions for Liferay Job Scheduler visually. Use the 6-field form to set schedules, pick from presets, validate, and preview the next execution times. Perfect for Liferay 7.x and DXP scheduled jobs.

Liferay Cron Expression Builder

Build Quartz cron expressions for Liferay Job Scheduler. 6-field visual builder with presets, validation, and next execution preview.

Quartz Cron Expression (6 fields)

0 0 * * * ?
Every second

Next 5 Execution Times (Local TZ)

1. 6/12/2026, 1:20:28 PM
2. 6/12/2026, 1:21:28 PM
3. 6/12/2026, 1:22:28 PM
4. 6/12/2026, 1:23:28 PM
5. 6/12/2026, 1:24:28 PM

Liferay Note: Cron jobs run in the portal's server timezone. Verify timezone settings in server.xml or JAVA_OPTS. Cluster deployments execute on all nodes — use portal.scheduler.dispatch=false to prevent duplicate executions.

About Quartz Cron in Liferay

Liferay uses Quartz Scheduler for time-based job execution. Unlike standard Unix cron (5 fields), Quartz uses 6 fields: second minute hour day-of-month month day-of-week. This allows for sub-minute scheduling — useful for high-frequency tasks.

The 6 Cron Fields

Second (0-59)Which second within the minute (0 = at the top, 30 = halfway through).
Minute (0-59)Which minute within the hour.
Hour (0-23)Which hour of the day (0 = midnight, 12 = noon).
Day of Month (1-31)Which day of the month. Use * for every day, or ? if you're specifying day-of-week instead.
Month (1-12)Which month (1 = January, 12 = December). Use * for every month.
Day of Week (0-6)Which day of week (0 = Sunday, 1 = Monday, ..., 6 = Saturday). Use ? if you're specifying day-of-month instead.

Special Characters

  • * — any value (e.g., * in minute field = every minute)
  • ? — no specific value (used only for day-of-month and day-of-week)
  • - — range (e.g., 1-5 = 1, 2, 3, 4, 5)
  • , — list (e.g., 1,3,5 = run at 1, 3, and 5)
  • / — increment (e.g., */15 = every 15 units; 1-30/5 = 1, 6, 11, 16, 21, 26)

Common Examples

0 0 9 * * *
Every day at 9:00 AM (and 0 seconds)
0 */15 * * * *
Every 15 minutes
0 0 0 1 * *
First day of every month at midnight
0 0 9 * * 1
Every Monday at 9:00 AM
30 2 * * * *
Every minute and 30 seconds

Using Cron in Liferay

Via Job Scheduler Portlet

  1. Open Control Panel → Apps → Scheduler
  2. Click "Add" to create a new job
  3. Enter a name and select a trigger type (Cron)
  4. Paste the cron expression into the "Cron expression" field
  5. Save and the job will run according to the schedule

Via Custom Code

SchedulerEngineHelperUtil.schedule( Trigger.class.getName(), "com.example.MyJob", "0 0 9 * * *", // Cron expression StorageType.PERSISTED );

Frequently Asked Questions

What is Quartz cron format?
Quartz is a scheduling library used by Liferay. Unlike Unix cron (5 fields), Quartz uses 6 fields: second, minute, hour, day-of-month, month, day-of-week. Each field can be a number, wildcard (*), range, or list.
How do I use cron expressions in Liferay?
In Liferay 7.x/DXP, use cron expressions in the Job Scheduler portlet (Control Panel > Scheduler) or in custom Liferay plugins that implement trigger scheduling. The expression is passed to Quartz scheduler.
What does the ? character mean?
"?" is a wildcard that means "no specific value". Use it for day-of-month or day-of-week when you only want to specify one, not both. For example: "0 0 9 * * ?" = every day at 9 AM, regardless of day of week.
Why is my job running twice in a cluster?
By default, Liferay schedules fire on all cluster nodes. Use portal.properties: portal.scheduler.dispatch=false to limit to one node, or implement cluster-aware logic in your job code.
Does the timezone matter?
Yes. Cron jobs run in the portal's server timezone. If the server runs in UTC but you expect EST, jobs will fire at the wrong times. Check server.xml, JAVA_OPTS (-Duser.timezone), or portal.properties for timezone config.