How to pass multiple parameters to cron job with curl?

As an alternative way, you can use \ before & which is a special character for shell. Generally, & is one of special characters that are meaningful for shell.

So, using a backslash [beside Quoting solution] can be a good solution to this problem. more

In your example you can simply apply this command:

curl -sS http://example.com/cronjob.php?days=1\&month=1

You'll notice that this doesn't exactly work in your shell, either.

What you need to do is put single quotes around the URL, like so:

curl -sS 'http://example.com/cronjob.php?days=1&month=1'

Tags:

Curl

Cron