Scheduled Job
Steps
- Create a project job_console_project
- Then create a JavaScript service named my_job_handler.js
- Replace the service code with the following content:
console.log("Hello from My Job!");
- Then create a Scheduled Job named my_job.job
- Replace the content with the following JSON code:
{
"expression":"0/10 * * * * ?",
"handler":"job_console_project/my_job_handler.js",
"description":"My Job"
}
- Publish the project
-
After 10s in the Console view you should see the following lines:
[2018-05-14T12:05:00.061Z] [INFO] Hello from My Job!
Note: the log messages in the Console view are in a reverse order - the newest are on top
For more information, see the API documentation.