# Weird behaviour of schedulePackageInstall

**URL:** <https://forums.suse.com/t/weird-behaviour-of-schedulepackageinstall/27628>\
**Category:** SUSE Multi Linux Manager\
**Created:** [November 17, 2015, 1:36am UTC](https://forums.suse.com/t/weird-behaviour-of-schedulepackageinstall/27628 "2015-11-17T01:36:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcodv](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@marcodv](https://forums.suse.com/u/marcodv)\
**Post date:** [November 17, 2015, 1:36am UTC](https://forums.suse.com/t/weird-behaviour-of-schedulepackageinstall/27628/1 "2015-11-17T01:36:14Z")

</div>

Hi all.  
I want to schedule a packages update via a ruby script.  
I am able to make suse manager api call and set the packages schedule with schedulePackageInstall.  
The weird behaviour is that when I set the schedule by script, this action is scheduled twice for the same system.  
For example , I want to update openldap through my script and when I call schedulePackageInstall, with the package id, suse manager schedule the operation twice  
and with the same package.  
And because of that the values returned from schedulePackageInstall is not only a single value, but a couple of values because the operation have been scheduled twice.  
Anyone has any idea about why?

---

<div class="post-metadata">

**Author:** ![kwk](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/kwk/32/11997_2.png) [@kwk](https://forums.suse.com/u/kwk)\
**Post date:** [November 17, 2015, 10:09am UTC](https://forums.suse.com/t/weird-behaviour-of-schedulepackageinstall/27628/2 "2015-11-17T10:09:09Z")

</div>

That’s hard to answer without seeing the sourcecode. Can you share the code, maybe via e.g. [pastebin.com](http://pastebin.com) ?

---

<div class="post-metadata">

**Author:** ![marcodv](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@marcodv](https://forums.suse.com/u/marcodv)\
**Post date:** [November 18, 2015, 1:34am UTC](https://forums.suse.com/t/weird-behaviour-of-schedulepackageinstall/27628/3 "2015-11-18T01:34:10Z")

</div>

Hey kwk,  
unfortunately I can’t use pastebin because is blocked.  
I paste the code here because is only 3 line of code

def make\_call(upgradetime)  
actions\_id = @api.call(‘system.schedulePackageInstall’, @key, 1000010183, 34744, Time.iso8601(upgradetime))  
actions\_id  
end

I guess that the code is quite self-explanatory.  
So I am set a schedulePackageInstall action where @key is the session to suse manager, 1000010183 is the system\_id, 34744 is the package id and with Time.iso8601(upgradetime) I am just sure that  
I passed the time as iso8601…  
This method return the actions id from schedulePackageInstall.  
Again, the problem is that the package schedule action is done twice.  
Any idea about??

---

<div class="post-metadata">

**Author:** ![kwk](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/kwk/32/11997_2.png) [@kwk](https://forums.suse.com/u/kwk)\
**Post date:** [November 18, 2015, 11:51am UTC](https://forums.suse.com/t/weird-behaviour-of-schedulepackageinstall/27628/4 "2015-11-18T11:51:02Z")

</div>

[QUOTE=marcodv;30468]  
Again, the problem is that the package schedule action is done twice.  
Any idea about??[/QUOTE]

Uhm, no, sorry.

You could check /var/log/rhn/rhn\_server\_xmlrpc.log which logs the API calls. Maybe you have a script error and schedulePackageInstall is indeed called twice.

Else you’ll need to open a support call and have the engineering team take a look at this problem.
