This website uses cookies to ensure you get the best experience on our website.

Skip to content
LOGO
  • Company

    About IGNEK

    Learn about our story and our mission.

    Careers

    We're hiring!

    We always looking for talented peoples. Join our team!

    Blogs

    The latest industry news, updates and info.

    Case Studies

    Take a closer look at the projects we've delivered

    Webinar

    Watch our latest organized webinar

    Get in touch with our HR team

    • hr@dev.ignek.com
    • +91 93284 95160
    • Ahmedabad, Gujarat, India – 382470
  • Services

    Enterprise Portal Development

    Custom Enterprise Portal Development for flawless Solutions

    Dedicated Development Team

    Expand Teams, Optimize Development with Our Expertise

    Back-end Development

    Empowering your digital presence with robust backend development expertise

    Front-end Development

    Crafting engaging user experiences through expert frontend development

    Digital Transformation

    Embrace digital transformation by modernizing process

    SaaS Development

    Transform your business with SaaS Innovative Solutions

    Technologies

    Liferay Services

    Development & Customization

    Theme

    Upgradation

    Migration

    Proof of Concept

    Performance Tunning

    Architecture

    Support & Maintenance

    E-commerce

    Expert Advice

    React Services

    Enterprise Development

    Custom Application

    Single Page Application

    Architecture

    API Integration

    Migration

    Consulting

    Maintenance & Support

    Spring Boot Services

    Web Service

    MVC Web Development

    API Integration

    Security

    Migration

    Microservices

    Support & Maintenance

    AEM Services

    Consulting Service

    Site Development

    Migration & Upgradation

    Integration

    Maintenance & Support

    Custom Solutions

    Content Management

    Team Augementation

  • Solution

    Ready for digital excellence

    In our rapidly evolving world, businesses are always on the lookout for fresh ways to improve their operations and connect with their audiences.

    Contact US

    Solutions

    SaaS : Software As A Service

    Transforming industries through cutting edge SaaS solutions.

    Customer Portal : Boost Business Productivity

    Streamline operations and enhance productivity with our Customer Portal solution.

    Liferay Based Intranet Portal

    Internal portal for company communication, collaboration and resources

    Integration

    Matomo Integration with Liferay

    Integrate Matomo to enable user interactions seamlessly.

    Microsoft Teams integration with Liferay

    Integrate to enable seamless collaboration, messaging within your portal.

    Jira Integration With Liferay

    Optimizes business operations by integrating with Jira.

  • Hire Us

    Liferay

    Get expert Liferay developers for seamless portal solutions.

    React JS

    Get expert ReactJS developers for dynamic web solutions.

    Web Developer

    Get custom web solutions from IGNEK's expert developers.

    Spring Boot

    Get top-notch Spring Boot developers for your project success!

    Healthcare

    Get top Healthcare Developers for cutting-edge medical software.

    MERN Stack

    Get expert MERN developers from IGNEK for custom, innovative project solutions.

    Why Hire Developers From IGNEK ?

    • Certified Developer
    • Transparent Communication
    • Flexible Hiring Modals
    • Fully Signed NDA
    • Cost Effective
    • Easy Exit Policy

    Get in touch with our Sales team

    • sales@dev.ignek.com
    • +91 6351576580
    • info@dev.ignek.com
    • Ahmedabad, Gujarat, India – 382470
SCHEDULE CALL
  • COMPANY
    • About
    • Case Studies
    • Blogs
    • Career
    • Webinar
  • SERVICES
    • Enterprise Portal Development
    • Dedicated Development Team
    • Back-end Development
    • Front-end Development
    • Digital Transformation
    • SaaS Development
  • SOLUTION
    • Customer Portal:  Boost Business Productivity
    • SaaS : Software as a Service
    • Liferay Based Employee Intranet Portal
  • TECHNOLOGY
    • Liferay Services
      • Liferay Development and Customization
      • Liferay Theme Development Service
      • Liferay DXP 7.4 Upgrade
      • Liferay Migration
      • Liferay Proof Of Concept
      • Liferay Performance Tuning
      • Liferay Architecture Design Service
      • Liferay Support And Maintenance Service
      • Liferay Ecommerce Development
      • Liferay Expert Advice
    • ReactJS Services
      • ReactJS Enterprise Application Development
      • ReactJS Custom Application Development
      • ReactJS Single Page Application Development (SPA)
      • ReactJS Applications Architecture
      • ReactJS API Integration
      • ReactJS Migration
      • ReactJS Consulting
      • ReactJS Maintenance and Support
    • Spring Boot Services
      • Spring Boot Web Development Service
      • Spring MVC Web Development
      • Spring Boot API Integration Service
      • Spring Boot Security
      • Spring Boot Migration Service
      • Spring Boot Microservices
      • Spring Boot Support & Maintenance Service
    • AEM Development Services
      • AEM Consulting Services
      • AEM Site Development
      • AEM Migration & Upgradation
      • AEM Integration Services
      • AEM Maintenance & Support
      • AEM Content Management
      • Custom AEM Solutions
      • AEM Team Augmentation
  • INTEGRATION
  • HIRE US
    • Hire Liferay Developer
    • Hire ReactJS Developer
    • Hire Spring Boot Developer
    • Hire Healthcare Developer
    • Hire Web Developer
    • Hire MERN Stack Developer
  • CONTACT US
  • Company

    About IGNEK

    Careers

    We're hiring!

    Blogs

    Case Studies

    Webinar

    Get in touch with our HR team

    • hr@dev.ignek.com
    • +91 93284 95160
    • Ahmedabad, Gujarat, India – 382470
  • Services

    Enterprise Portal Development

    Dedicated Development Team

    Back-end Development

    Front-end Development

    Digital Transformation

    SaaS Development

    Technologies

    Liferay Liferay Services
    • Development & Customization
    • Theme
    • Upgradation
    • Migration
    • Proof of Concept
    • Performance Tuning
    • Architecture
    • Support & Maintenance
    • E-commerce
    • Expert Advice
    React React Services
    • Enterprise Development
    • Custom Application
    • Single Page Application
    • Architecture
    • API Integration
    • Migration
    • Consulting
    • Maintenance & Support
    Spring Boot Spring Boot Services
    • Web Service
    • MVC Web Development
    • API Integration
    • Security
    • Migration
    • Microservices
    • Support & Maintenance
    AEM AEM Services
    • Consulting Service
    • Site Development
    • Migration & Upgradation
    • Integration
    • Maintenance & Support
    • Custom Solutions
    • Content Management
    • Team Augmentation
  • Solution

    Ready for digital excellence

    In our rapidly evolving world, businesses are always on the lookout for fresh ways to improve their operations and connect with their audiences.

    Contact US

    Solutions

    SaaS : Software As A Service

    Customer Portal : Boost Business Productivity

    Liferay Based Intranet Portal

    Integration

    Matomo Integration with Liferay

    Microsoft Teams integration with Liferay

    Jira Integration With Liferay

  • Hire Us

    Liferay

    React JS

    Web Developer

    Spring Boot

    Healthcare

    MERN Stack

    Why Hire Developers From IGNEK ?

    • Certified Developer
    • Transparent Communication
    • Flexible Hiring Modals
    • Fully Signed NDA
    • Cost Effective
    • Easy Exit Policy

    Get in touch with our Sales team

    • sales@dev.ignek.com
    • +91 6351576580
    • IGNEK
    • Ahmedabad, Gujarat, India – 382470
  • SCHEDULE CALL

Scheduler in Liferay 7.4

  • Liferay
  • October 16, 2023

Share On :

Introduction:
  • In the older versions of Liferay, cron expressions were used to develop schedulers; we have a better approach to doing the same in the latest Liferay.
Prerequisites:
  • JDK 11
  • Liferay 7.4

We can create a new class in any portlet by simply adding a Configuration Interface and a Job Scheduler class to it.

1) Create SchedulerConfiguration Interface

				
					// SchedulerConfiguration.java
@ExtendedObjectClassDefinition(category = "infrastructure")
@Meta.OCD(
		id = "com.liferay.scheduler.portlet.SchedulerConfiguration",
		localization = "content/Language",
		name = "liferay-Configuration-name"
	)
	public interface SchedulerConfiguration {
		@Meta.AD(
				deflt = "1", description = "liferay-scheduler",
				name = "Liferay Scheduler", required = false
			)
			public int interval();
	}


				
			

In this class, we are defining the basic configuration for our scheduler class.

Categorization: The @ExtendedObjectClassDefinition annotation, with the category parameter, allows us to categorize the configuration under a specific category, making it easier to organize and locate related settings in the administration interface. With categorization, we can adjust the interval time of our scheduler.
These configurations can be done from Control Panel → Configuration → System Setting → Infrastructure. 

Configure settings through Control Panel
  • In the ‘Infrastructure’ section, we can locate our scheduler.
Find scheduler in Infrastructure section

2) Create Job Scheduler Class

  1. Create a Job Scheduler class and implement SchedulerJobConfiguration.
				
					// LiferaySchedulerJobConfiguration.java
public class LiferaySchedulerJobConfiguration implements SchedulerJobConfiguration {

}
				
			
  1. Now, we need to override all the methods required to implement the SchedulerJobConfiguration interface.
				
					// LiferaySchedulerJobConfiguration.java
public class LiferaySchedulerJobConfiguration implements SchedulerJobConfiguration {
	@Override
	public UnsafeRunnable<Exception> getJobExecutorUnsafeRunnable() {
		return null;
		
	}
	@Override
	public TriggerConfiguration getTriggerConfiguration() {
		return null;
	}
}
				
			
  1. Add @component annotation
    • Now, add the @Component annotation just before and outside the class. This annotation is used to declare a class as a component that should be managed by the OSGi container.
				
					@Component(configurationPid = "com.liferay.scheduler.portlet.LiferaySchedulerJobConfiguration", service = SchedulerJobConfiguration.class)

				
			
  1. Implementing Scheduler Job Work.
    • We can implement our custom logic within the UnsafeRunnable method as follows
				
						
	@Override
	public UnsafeRunnable<Exception> getJobExecutorUnsafeRunnable() {
		return () -> {
			System.out.println("Hello Ignek Viewers :)");
		};
	}

				
			
  1. Triggering Scheduler
    • In the TriggerConfiguration method, we specify the time interval for the scheduler and return it to our scheduler configuration interface. 
    • The time unit is determined by the value we set in the ‘Infrastructure iInterval field.

      For example :
      • if our time unit is set to ‘Day’ and our interval time is ‘2,’ the scheduler will run every two days. The running time is calculated as the ‘TimeUnit * interval.
				
					
	@Override
	public TriggerConfiguration getTriggerConfiguration() {
		return TriggerConfiguration.createTriggerConfiguration(_schedulerConfiguration.interval(), TimeUnit.MINUTE);
	}
				
			
  1. Activate Scheduler.
    • To activate the scheduler, we override the activate method of the scheduler.
				
						@Activate
	@Modified
	protected void activate(Map<String, Object> properties) {
		_schedulerConfiguration = ConfigurableUtil.createConfigurable(SchedulerConfiguration.class, properties);
	}
				
			

3) Liferay JOB Scheduler

  • Liferay provides the option to view scheduled tasks and make lots of changes to them.
  • To access this feature, go to Control Panel → Configuration, where we can find the ‘Job Scheduler’ option.
Manage scheduled tasks in Liferay
  • In this section, we can manage all scheduled Job schedulers and even add new Jobs.
Adding new scheduled job
  • When we navigate to the scheduled jobs section, we can perform the following actions:
    1. View all scheduled jobs.
    2. View the next scheduling time for each job. 
    3. Check the status of each job. 
    4. Run any job at any time by clicking the RUN button. 
    5. Pause or resume jobs as needed
Explore scheduled jobs with various actions

Explore Our Services

Discover how we can help your business thrive, whether you’re running a small startup, an SME, or a large enterprise. We’re here to understand your unique needs and goals, offering the expertise and resources to support your journey to success.

Stay informed about our Liferay services and updates by subscribing to our newsletter—just fill in the details below to subscribe.

Loading
Loading...

Related Blogs

January 28, 2020
Scheduler in Liferay 7 DXP Cover Image
Scheduler in Liferay 7/DXP
March 17, 2020
custom configuration under Instance Settings in Liferay 7.2 Cover Image
Create custom configuration under Instance Settings in Liferay 7.2
July 15, 2020
Configuration Creator in Liferay Cover Image
Configuration Creator in Liferay 7.2
Loading...

Featured Projects Portfolios

November 27, 2023
Government Job Platform User-Friendly, Secure and Scalable
Government Job Platform : User-Friendly, Secure, and Scalable
October 4, 2023
Invoice-Based Lending Finance Portal _ Fast, Secure, Reliable
Invoice-Based Lending Finance Portal : Fast, Secure, Reliable
October 3, 2023
Simplify Approvals and Goals With Agenda & Meeting SaaS Platform
Simplify Approvals and Goals With Agenda & Meeting SaaS Platform

Digital Solutions for Your Business with IGNEK

4.9

5.0

5.0

5.0

LOGO

Making the world a better place through constructing elegant hierarchies

COMPANY

  • About
  • Career
  • Case Study
  • Blogs

SERVICES

  • Enterprise Portal Development
  • Dedicated Development Team
  • Back-end Development
  • Front-end Development
  • Digital Transformation
  • SaaS Development

HIRE US

  • Liferay
  • Spring Boot
  • ReactJS
  • Healthcare
  • MERN Stack
  • AEM

CONTACT

  • info@dev.ignek.com
  • info@dev.ignek.com
SALES
  • sales@dev.ignek.com
  • (+91) 635 157 6580
CAREER
  • hr@dev.ignek.com
  • (+91) 932 849 5160
  • E 910-912, Ganesh Glory 11, Jagatpur Road, SG Highway, Ahmedabad, Gujarat - 382470

© 2018-2025 IGNEK, Inc. All rights reserved

Linkedin Facebook X-twitter Instagram