'Os.system doesn't push message in cron alert to cronitor?

I am running a python script using a cron job. When the script runs, it either alerts that it completed or failed. It is supposed to send a message to cronitor along with the completion ping. An example of the link is below:

 https://cronitor.link/p/id/key?state=complete&msg='Success'

When I just put the link into the search bar and hit Enter, the message shows up in cronitor. However, when I try to get the message to print when running the link through the script it doesn't work. Cronitor gets the ping that it completed successfully but no message shows up:

 cron_alert = "/usr/local/bin/curl --silent https://cronitor.link/p/id/key?state=complete&msg='Success'"
 os.system(cron_alert)

I tried removing '--silent' but that didn't make a difference. Any ideas on how to fix this? Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source