How to provide schedule recurrence using python-gvm

Hello!

How to fully configure schedule parameters while creating it via gmp.create_schedule with icalendar object?
Also, why where is multiple protocols version in the package, whereas by default it uses gmpv9 version in 20.8.0 release?

I’m trying to create it based on the docs:
https://python-gvm.readthedocs.io/en/latest/api/gmpv9.html?highlight=create_schedule#gvm.protocols.gmpv9.Gmp.create_schedule

But by default it creates with recurrence once (the default choice in the GUI too):

I guess I should provide some other parameters via icalendar.Event:
event.add("some_fancy_name_option_for_recurrence", value)

But there is no docs about what parameters could I provide or I’ve failed to find them.

Thanks in advance!

GVM versions

gsad: Greenbone Security Assistant 20.08.0~git-18568a46d-HEAD
gvmd: Greenbone Vulnerability Manager 20.08.0~git-ac4498c2-HEAD
openvas-scanner: OpenVAS 20.8.0
gvm-libs: 20.8.0

Environment

Operating system: Ubu tu
Kernel: Linux openvas 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Installation method / source: official source repositories

Docs for gmpv20.8 are here.
Default protocol using latest in python-gvm is gmpv208 in the python-gvm 20.8.0 release.
I am not sure about recurrence … but some research got me e.g. SO :

event.add('rrule', u'FREQ=YEARLY;INTERVAL=1;COUNT=10')

Tell me, if this helps you!

2 Likes

Additionally you can create an ical entry even in your favorite calendar software and copy the text into the Python code. There is a lot of software to create ical entries out there. Even GSA does that with ical.js.

3 Likes

Thank you, it worked!

By the way, seems like in the updated version of icalendar library (4.0.7), they had changed the format:
event.add('rrule', {"freq": "daily"}}

1 Like

This looks not even complicated. Thank you for figuring out!

1 Like

Thanks!
I think it would be great to provide some basic examples in the documentation: to help other, who transition from older gmpv protocols version.