Junos Space Developer
Reply
Contributor
Ar2r
Posts: 42
Registered: ‎11-29-2011
0

job management issue

 

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.

Recognized Expert
Yesh
Posts: 456
Registered: ‎09-29-2009
0

Re: job management issue

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

Contributor
Ar2r
Posts: 42
Registered: ‎11-29-2011
0

Re: job management issue

 

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

Recognized Expert
Yesh
Posts: 456
Registered: ‎09-29-2009
0

Re: job management issue

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

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.