Modifying the DP CLI cron job

You can modify the crontab file to change settings for the cron job.

Some common changes include:
  • Changing the schedule when the cron job is run.
  • Changing which Hive database the DP CLI will run against. To do so, change the argument of the -d flag to specify another Hive database, such as -d mytables to process tables in the database named "mytables".
  • Changing the amount of time (in seconds) that the Hive Table Detector waits between update jobs. To do so, change the argument of the -mwt flag to specify another time interval, such as -mwt 2400 for an interval of 2400 seconds.

To modify the DP CLI cron job:

  1. From the Linux command line, run the crontab -e command.
    The crontab file is opened in a text editor, such as the vi editor.
  2. Make your changes to the crontab file in the editor.
  3. Save the file.
The modified file may look like this:
30 4 * * * /usr/bin/flock -x -w 120 /localdisk/Oracle/Middleware/BDD/dataprocessing/edp_cli/work/detector.lock
  -c "cd /localdisk/Oracle/Middleware/BDD/dataprocessing/edp_cli && ./data_processing_CLI 
  -d mytables 
  -wl /localdisk/Oracle/Middleware/BDD/dataprocessing/edp_cli/config/cli_whitelist.txt 
  -bl /localdisk/Oracle/Middleware/BDD/dataprocessing/edp_cli/config/cli_blacklist.txt 
  -mwt 2400 >> /localdisk/Oracle/Middleware/BDD/dataprocessing/edp_cli/work/detector.log 2>&1"

For the first few runs of the cron job, check the detector.log log file to verify that the cron jobs are running satisfactorily.