Script is stored in subdirectory of home for user skrypty:
/home/skrypty/raporty_dobowe/skrypt_raporty.sh
and content of file skrypt_raporty.sh
#!/bin/bash -f
source /opt/CPshrd-R80.30/tmp/.CPprofile.sh
mgmt_cli -r true show-group name "Gr_Blocked_by_IOI" --format json | jq '.members[] | [.name, ."ipv4-address"] | @csv' -r > /home/skrypty/raporty_dobowe/raport_dobowy_$(date +"%d_%m_%Y").csv
mgmt_cli -r true show-group name "Gr_Blocked_by_IOI_FQDN" --format json | jq '.members[] | [.name] | @csv' -r > /home/skrypty/raporty_dobowe_FQDN/raport_dobowy_FQDN_$(date +"%d_%m_%Y").csv
sshpass -p XXXXX scp /home/skrypty/raporty_dobowe/raport_dobowy_$(date +"%d_%m_%Y").csv ioc@XXX.XXX.XXX.XXX:/opt/CPBlackIP
if it matters management server runs on R80.30 version.