USSD commands in crontab RUT241

I’d like to have a daily e-mail with the mobile data usage.
For this I try to use crontab and gsmctl -U command.
When I run command:
gsmctl -U *100#
then I get the correct response.
But when I try do the same daily in crontab using the following:
0 6 * * * gsmctl -U *100#
then I get a response like this:
+CME ERROR: retry operation
When I browse the syslog I see:
cron.err crond[7090]: USER root pid 704 cmd gsmctl -U *100
Does it meat that there’s some issue with the last character “#” and should it be written with some prefix?


Have you tried escaping with slashes like so?:

gsmctl -U \*100\#

You can also put the command into a script. Create script:

vi /etc/

Press ‘i’ to start editing. Paste:

gsmctl -U *100#

Press ESC and type ‘:wq!’ to save the script.

Add execution rights:

chmod +x /etc/

Add script to crontab:

0 6 * * * /etc/

Kind Regards,

1 Like


Thank you dude!
Adding backslash didn’t help but using scripts works fine!
I’ve made only a little correction inside the script: #!/bin/sh (instead of bash)

Thanks and regards!

This topic was automatically closed after 15 days. New replies are no longer allowed.