- Products
- Learn
- Local User Groups
- Partners
- More
What’s New in Device Diagnostics?
Dec 2nd @ 5pm CET / 11am EST
AI Security Masters
Security in the Pace of AI:
From Threat to Force Multiplier
CPX is Back!
Join us in Las Vegas, Vienna, and/or Bangkok!
Check Point Named a Leader
The Forrester Wave:
Enterprise Firewall Solutions, Q4 2026
What’s New in Agentic Network Orchestration
CheckMates Go:
Fun Ding
Today, I learned of an option in mgmt_cli that might be useful in scripting contexts: --sync false.
According to the CLI help:
[--sync] {true|false}
Synchronous execution of task - commands that generate the task will wait until the task is finished.
Default {true}
Environment variable: MGMT_CLI_SYNC
In practical terms, this suggests that for calls that would normally return a result right away, you'll get a task-id that can be monitored with show-task.
Where it is the most useful is in install-policy, which, when called with mgmt_cli, acts synchronously (i.e. does not complete until policy is installed).
[Expert@MyMgmt:0]# mgmt_cli -r true install-policy policy-package "Standard"
---------------------------------------------
Time: [11:17:54] 2/2/2026
---------------------------------------------
"Policy installation - Standard" in progress (40%)
...
In investigating this issue further, though, I realized that install-policy returns a task-id by default if called via Web API.
I confirmed it using the below:
[Expert@MyMgmt:0]# curl_cli -k https://127.0.0.1/web_api/install-policy -H 'Content-Type: application/json' -H 'X-chkp-sid: my-session-id' --request POST -d ' { "policy-package" : "Standard" }'
{
"task-id" : "b0c3cf65-b54f-4647-9c03-cf84077b32e1"
}
If I try to use --sync false with, say, run-script, you will get a "stuck" task that never completes until reboot:
[Expert@MyMgmt:0]# mgmt_cli -r true show-task task-id "f58349ae-4289-4f7c-b4ec-1c548be0a89a"
tasks:
- task-id: "f58349ae-4289-4f7c-b4ec-1c548be0a89a"
task-name: "MyMgmt - Test"
status: "in progress"
progress-percentage: 10
suppressed: false
comments: "In Progress..."
...
Which suggests that --sync false is designed only for install-policy and might not work for other API calls.
@Omer_Kleinstern at the very least we might want to update the docs for mgmt_cli to mention it is actually synchronous with install-policy.
The switch "--sync" is supported on all API commands that return a task.
There is also the switch "--sync-frequency" for cases where the duration of the task is long and you want to reduce the number of show-task commands that run.
Good to know!
I don't expect a lot of people to run into it either.
Having said that, in case someone asks again, it's now documented.
You never know, definitely good to be aware.
The switch "--sync" is supported on all API commands that return a task.
There is also the switch "--sync-frequency" for cases where the duration of the task is long and you want to reduce the number of show-task commands that run.
As run-script is not an API call that returns a task-id, it explains the behavior.
Curious why run-script doesn't return a task-id as it would allow for longer-running scripts to be triggered via the API call.
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 1 | |
| 1 |
Tue 24 Nov 2026 @ 01:30 PM (GMT)
La nueva realidad de los ataques DDoS: autonomía, escala y el futuro de la defensaWed 02 Dec 2026 @ 03:30 PM (GMT)
The New DDoS Reality: Autonomy, Scale, and the Future of DefenseThu 03 Dec 2026 @ 11:00 AM (EST)
Under the Hood: Check Point Cloud Firewall for Nutanix - How to Secure your AI WorkloadsTue 24 Nov 2026 @ 01:30 PM (GMT)
La nueva realidad de los ataques DDoS: autonomía, escala y el futuro de la defensaWed 02 Dec 2026 @ 03:30 PM (GMT)
The New DDoS Reality: Autonomy, Scale, and the Future of DefenseThu 03 Dec 2026 @ 11:00 AM (EST)
Under the Hood: Check Point Cloud Firewall for Nutanix - How to Secure your AI WorkloadsAbout CheckMates
Learn Check Point
Advanced Learning
WE SECURE YOUR AI TRANSFORMATION