Junos Space Developer
Junos Space Developer

job management issue

05.14.12   |  
‎05-14-2012 07:18 AM

 

Hi,

 

I've written scheduled method and schedule it to execute each 2 hours. After it invoked ones, I cann't cancel it.

I get the following info on "/api/space/job-management/jobs/{id}" request:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<job uri="/api/space/job-management/jobs/4554758">
    <id>4554758</id>
    <name>-4554758</name>
    <percent>100.0</percent>
    <status>SUCCESS</status>
    <jobType></jobType>
    <scheduledStartTime>Mon, 14 May 2012 11:04:21 GMT</scheduledStartTime>
    <user>super</user>
    <recurrence>Every 2 hours Starts: Mon, 14 May 2012 11:04:21 GMT Ends by: Thu, 14 Jun 2012 11:04:21 GMT</recurrence>
    <progress-update href="/api/space/job-management/jobs/4554758/progress-update"/>
</job>

If I try to cancel it by DELETE request, the platform sends that the job has already finished. The job invokes each 2 hours and I couldn't figure out how to cancel it. Please, help.

 

Thank you.

3 REPLIES
Junos Space Developer

Re: job management issue

05.15.12   |  
‎05-15-2012 11:33 PM

Hi,

 

This is bug in Junos Space. It is creating new job ids for the next recurrence. I have filed a bug report.

 

The only workaround I can find is to check for the next job id which got created (for next occurance) and use Delete API or cancel the job using the Platform UI.

 

Regards

Yesh

Junos Space Developer

Re: job management issue

05.17.12   |  
‎05-17-2012 04:18 AM

 

How can I get the next job id? Maybe there's a way to handle next job creation and store its id?

Junos Space Developer

Re: job management issue

05.17.12   |  
‎05-17-2012 11:16 PM

Hi,

 

Sorry this workaround wont work. I was hoping you can match the name of the job but that doesnt seem to be the case.

 

The only way to cancel is from Platform UI I guess.

 

Thanks

Yesh