Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Is it possible to execute a job which repeats itself from JAVA?

  1. #1
    Join Date
    Dec 2015
    Posts
    4

    Default Is it possible to execute a job which repeats itself from JAVA?

    I want to execute a job which repeats itself every several minutes and I want to execute the Job from JAVA.

    However, I do not want to hold the thread since I have other jobs to be executed too.

    Any ideas? Thanks~

  2. #2
    Join Date
    Nov 2009
    Posts
    688

    Default

    Use Kitchen to run the job and make a cron job or windows task which start the task every serveral minutes

  3. #3
    Join Date
    Dec 2015
    Posts
    4

    Default

    Quote Originally Posted by johanhammink View Post
    Use Kitchen to run the job and make a cron job or windows task which start the task every serveral minutes
    Thanks for the reply. But I want to execute the Spoon Job by JAVA. The Spoon Job I want to run has a job scheduling, which repeats itself. My code is something like......

    JobMeta jobmeta=new JobMeta(filePath, repository);
    job = new Job(repository, jobmeta);


    job.initializeVariablesFrom(null);
    job.getJobMeta().setInternalKettleVariables(job);
    job.copyParametersFrom(job.getJobMeta());

    job.setParameterValue(xxxx, xxxx);

    job.execute(0, null);

    However, after the job executed, it only execute once and then the job stopped

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.