tags:

views:

110

answers:

2

I'm running two cron jobs:

This one executes without a problem:

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

But this doesn't run at all:

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

Is this because of the ampersand (&)? If yes, how to pass multiple parameters?

Using argv is not an option.

+3  A: 

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'
SamB
+1  A: 

Try a POST Request

curl -d "days=1&month=1" www.example.com/cronjob.php
streetparade
Any particular reason you suggest a POST?
SamB
No harm in mentioning it, it's good to know (Although I'll go with GET)
Yeti
well it just up you you also could do it with a GET request. This is just how i would do it. However this would work, and that is the point :-)
streetparade