Cronjob dossent work in cpanel

Hi out there i need little help here!

I have Cpanel on my linode server and trying to run a cronjob to start a import

my site i a wordpress and i use wp all import to get the stuff inported..

but i can't get the cron job to work. here is what i have setup !

Current Cron Jobs

Minute Hour Day Month Weekday Command Actions

0 * * * * /usr/local/bin/ea-php70 /home/max/publichtml/wp-cron.php?importkey=d.JLSTo&import_id=3&action=trigger Edit Delete

*/2 * * * * /usr/local/bin/ea-php70 /home/max/publichtml/wp-cron.php?importkey=d.JLSTo&import_id=3&action=processing Edit Delete

but i can't see it running anywhere. can anyone help

5 Replies

The URL format you're using (?import_key=…) is for requests performed over HTTP. You are executing the wp-cron script directly; that won't work (and it looks like you copy pasted the query string together with noise like Edit/Delete buttons from the web control panel)

ok this is what i have in my wordpress

wget -q -O /dev/null "https://max.dk/wp-cron.php?import_key=d … on=trigger">https://max.dk/wp-cron.php?importkey=d.JLSTo&importid=3&action=trigger"

but that dossent work etiher

how do i get it to work ?

what to do ? :)

if you put that in cron it probably would work, but you need to be aware of some pecularities of cron:

1) use explicit paths to binaries everywhere (e.g. /usr/bin/wget instead of wget)

2) don't assume that you're executing in a certain directory, specifically cd to it if your cron script needs that

3) make sure the last line of the cron ends with a new line, some cron implementations will ignore it if it doesn't

BTW I just clicked on the link you use and I got an SSL error. Your SSL is misconfigured.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct