Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Cron is a time-based job scheduler. DBSync uses cron to schedule jobs to run periodically at fixed times, dates or intervals.

The cron is a long-running process that executes commands at specific dates and times. You can use this to schedule activities, either as one-time events or as recurring tasks.

Timing Syntax

Cron determines how often and when the cron job is going to run.


It consists of five parts:


  1. Minute
  2. Hour
  3. Day of month
  4. Month
  5. Day of week

Examples based on the above "commands to execute"

This cron job will run every minute, all the time

* * * * * [command]

This cron job will run at minute zero, every hour (i.e. an hourly cron job)

0 * * * * [command]

This will run once a month, on the second day of the month at midnight (i.e. January 2nd 12:00am, February 2nd 12:00am etc.)

0 0 2 * * [command]



Add these 2 commands in system.properties

log.maxcount=
log.cleaner.cron =

The above commands need to add in the system.properties to execute the cron- log file cleaner.

Example:

log.maxcount= 12
log.cleaner.cron = 0 0/2 * * * ? *

The above commands explains that in every 2 mins 1 log file will be created in logs tab. Once, 12 log files will be created after 

  • No labels