running a cron job with parameters

Asked by:
HubFans / n/a Points
2018-06-05 10:59 pm EST
Website Troubleshooting
I am trying to run a cron like this
php -q /home/wxcalg5/public_html/test/forecast-compare-include.php?log&config=am

I think the '?' and '&' are keeping it from being executed.
Does anyone have a solution to this?

To ask this user for more information, please first login.

To submit an answer, please login.



17,028 Points
2018-06-06 9:08 am EST

Sorry to hear about the problem with your cron job. The question mark typically indicates a query and is a normal part of a URL where a query is involved. If that query requires a response, then that is a possible reason that your cron isn't working -it may be waiting on a response. The "&" can also be part of the query and shouldn't cause the cron job to fail. Check the URL in a browser (using the "http" version of line you're trying to use in the cron). If it works, then you should contact live support to review the cron. Generally, if you want to test, run a simple cron job and if that works, then there's nothing wrong at the server level. You can also reference this video for more information on setting up CRON jobs. There's also a community forum from cPanel that discusses troubleshooting cron jobs.

I hope that helps to resolve the problem! If you require further assistance please let us know!

Arnel C.

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.