You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now I want to send an email as part of that scheduled task. But I'm not sure if I can add multiple Actions for a scheduled task.
I considered creating a separate task which sends the email but I get the following error:
[...]
File "..\createSnapshot.py", line 205, in
create_schedule_mail(vm)
File ..\createSnapshot.py", line 118, in create_schedule_mail
scheduledTask = stm.Create(vm, spec=taskSpec)
File "C:\Program Files\Python39\lib\site-packages\pyVmomi\VmomiSupport.py", line 598, in
self.f(*(self.args + (obj,) + args), **kwargs)
File "C:\Program Files\Python39\lib\site-packages\pyVmomi\VmomiSupport.py", line 388, in _InvokeMethod
return self._stub.InvokeMethod(self, info, args)
File "C:\Program Files\Python39\lib\site-packages\pyVmomi\SoapAdapter.py", line 1575, in InvokeMethod
raise obj # pylint: disable-msg=E0702
pyVmomi.VmomiSupport.InvalidArgument: (vmodl.fault.InvalidArgument) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = 'A specified parameter was not correct: spec.action',
faultCause = ,
faultMessage = (vmodl.LocalizableMessage) [],
invalidProperty = 'spec.action'
}
Additional context
That is how I tried to implement the seperate task
Hi all,
I have a script that uses the following function to create a scheduled task snapshot.
Now I want to send an email as part of that scheduled task. But I'm not sure if I can add multiple Actions for a scheduled task.
I considered creating a separate task which sends the email but I get the following error:
[...]
File "..\createSnapshot.py", line 205, in
create_schedule_mail(vm)
File ..\createSnapshot.py", line 118, in create_schedule_mail
scheduledTask = stm.Create(vm, spec=taskSpec)
File "C:\Program Files\Python39\lib\site-packages\pyVmomi\VmomiSupport.py", line 598, in
self.f(*(self.args + (obj,) + args), **kwargs)
File "C:\Program Files\Python39\lib\site-packages\pyVmomi\VmomiSupport.py", line 388, in _InvokeMethod
return self._stub.InvokeMethod(self, info, args)
File "C:\Program Files\Python39\lib\site-packages\pyVmomi\SoapAdapter.py", line 1575, in InvokeMethod
raise obj # pylint: disable-msg=E0702
pyVmomi.VmomiSupport.InvalidArgument: (vmodl.fault.InvalidArgument) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = 'A specified parameter was not correct: spec.action',
faultCause = ,
faultMessage = (vmodl.LocalizableMessage) [],
invalidProperty = 'spec.action'
}
Additional context
That is how I tried to implement the seperate task
The text was updated successfully, but these errors were encountered: