Pentaho

 View Only

 How to schedule Spoon job?

Claudio Battaglino's profile image
Claudio Battaglino posted 09-09-2024 09:38

Hi,

I have saved some Spoon jobs in the Pentaho database (I can see them in the r_job_entry table).

I was used to executing them using the Pentaho server interface (Schedules section), but I know this way is not yet supported. In fact I have some strange behaviors using that interface.

So, how can I schedule this job on Pentaho 9.3 CE?

Job to be scheduled

I read that I can run this command: "/path_to_pentaho/kitchen.sh -file="/path_to_your_job/job.kjb" -logfile="/path_to_log/logfile.log" but how do I generate a kjb file?

Thank you very much.

Claudio B.

 

Claudio Battaglino's profile image
Claudio Battaglino

I've solved in this way:

  • I have downloaded the package "Pentaho PDI" on the server.
  • I have created the folder "scheduled_jobs".
  • I have exported, from the Pentaho PDI on my computer , the job I want to schedule using the command: Export->Export all linked resources
  • I have copied the files of this zip (jobs and trasactions) into the folder "esami" into "scheduled_jobs".
  • I have executed this command: pentaho@pentaho:~/scheduled_jobs$ /home/pentaho/data-integration/kitchen.sh -file="/home/pentaho/scheduled_jobs/esami/J_load_esami_datamart.kjb" -logfile="/home/pentaho/logs/schedules.log"

It works, so now I can schedule this command in a cron job.

Claudio