Implementing CronJobs with Custom Logic

After completing this lesson, you will be able to:

After completing this lesson, you will be able to:

  • Recognize the process used to implement and manage new CronJobs for executing custom business logic

Implement a new CronJob using the API

So far, you've discovered how to run and manage CronJobs, provided out-of-the-box.

What if you want to run a CronJob with your business logic? 

The next interaction offers you the theory and the steps needed to code, register, and run a new CronJob.

Basic CronJob - Demo

Okay. That’s enough theory. It’s time to implement a basic CronJob, using an API to print "Hello World" to the console.

In the next demonstration, you will observe how to use the entire process, for building the necessary components, that allows us to manually create and start a CronJob instance in the Backoffice.

Abortable Hello World CronJob - Demo

Now, let’s take one step further. In the next demonstration, you will observe an implementation of an abortable CronJob, based on the previous "Hello World" cronjob demonstration.  You will observe, after implementing and building the relevant components, the implementation will start, abort, and resume the CronJob instance manually from the BackOffice.

Additional Properties and Facts about CronJobs

Now that you know how to implement a CronJob from scratch, let’s take a look at additional properties and facts about CronJobs:

Log in to track your progress & complete quizzes