Liferay 7: Scheduler Manager Gogo Shell Commands

For the development of a project based on Liferay 7, I had to create a module for job management. Scheduler Manager Gogo Shell Commands implements a set of Gogo Shell commands that handle Liferay jobs. The tasks you can perform are:

  1. list: List of the all Jobs filtered by state (default ALL)
  2. info: Print detail info of the job
  3. pause: Pause one or more Jobs by Job Name, Group Name and Storage Type
  4. resume: Resume one or more Jobs by Job Name, Group Name and Storage Type

If you are impatient you can immediately download the bundle from the repository GitHub and install it on your Liferay instance.

Scheduler Manager #GogoShell Commands @Liferay plugin for handle #liferay jobsClick To Tweet

The version 1.3.0 of this project was tested on Liferay 7.2.0 Community Edition GA1

1. Getting Started

To start testing the plugin you need:

  1. clone this repository
  2. build project
  3. deploy OSGi module (it.dontesta.labs.liferay.gogo.scheduler.manager-$version.jar)

The last gradle command, create a OSGi bundle that you must deploy on your Liferay instance. You can deploy with this command (replace auto deploy directory with your).

You could deploy also with the deploy gradle task, but must setting the auto.deploy.dir in gradle.properties file.

2. After deploy bundle

After the deploy of the bundle you can check if the bundle is correctly installed. Connect to Gogo Shell via telnet and execute lb command.

Well done! The bundle is in state ACTIVE.

3. How to use commands

Via Gogo Shell we check deployed commands (that have scheduler as scope) via completion.

The list of commands obtained are those described at the beginning. You can see for each command the usage, by this command (help scope:commandName). Follow the help of the four available commands.

The storage types are defined in StorageType

The states of the trigger defined in TriggerState Enumeration

3.1 Scheduler List

List of the jobs filtered by state

Figure 1 – List of the jobs filtered by state



List of the jobs filtered by state

Figure 2 – List of the jobs filtered by state

3.2 Scheduler Pause and Resume

3.3 Scheduler Info

This command (compared to the list of jobs) shows additional information:

  1. Cron Expression
  2. Destination Name
  3. Job Exceptions
Detail of the jobs

Figure 3 – Detail of the jobs

4. Resources

  1. Liferay 7 CE/Liferay DXP Scheduled Task post by David H Nebinger (on Liferay Blog)
  2. Scheduler Example on my GitHub account
  3. How to implement a custom Gogo shell command for Liferay 7 post by Marco Napolitano

Antonio Musarra

I began my journey into the world of computing from an Olivetti M24 PC (http://it.wikipedia.org/wiki/Olivetti_M24) bought by my father for his work. Day after day, quickly taking control until … Now doing business consulting for projects in the enterprise application development using web-oriented technologies such as J2EE, Web Services, ESB, TIBCO, PHP.

You may also like...

TIBCO JasperReports Server & JBoss EAP 7.2Come installare Liferay 7.2 GA2 su WildFly 16 + Oracle Database 19c

In questo video tutorial vi mostrerò come installare step-by-step TIBCO Jasper Reports Server 7.5 Community Edition su RedHat JBoss EAP 7.2, utilizzando CentOS 8.1 come sistema operativo e PostgreSQL come database server.

Vedremo come affrontare l'installazione di Jasper Reports Server senza l'ausilio dell'installer; questa è l'opzione solitamente adottata in ambiti enterprise. I punti salienti di questo tutorial sono:

  • Quali sono i requisiti software
  • Quali sono i requisiti hardware
  • Download del software
  • Layout d’installazione
  • Installazione di OpenJDK 11
  • Installazione di PostgreSQL 10
  • Installazione di JBoss EAP 7.2.0
  • Configurazione & Installazione di Jasper Reports Server
  • Configurazione di JBoss EAP 7.2.0
  • Start di Jasper Reports Server