1

I'm trying to set up a cron job to run the feed me direct feed url in 123-reg hosting. The command they are saying to use is:

/usr/local/bin/php /home/username/public_html/index.php?p=actions/feed-me/feeds/run-task&direct=1&feedId=1&passkey=xxxxxxx

However I'm getting an error:

Could not open input file: /home/username/public_html/index.php?p=actions/feed-me/feeds/run-task

The feed action runs fine when used in a url. So is there something not right with the cron? Looking at the error message that is sent through it seems to be stripping anything after the first & ?

1
  • The error message states that the index.php cannot be found. You can double check the scripts correct path just to be sure using echo __DIR__;
    – MisterMike
    Feb 24, 2021 at 14:26

1 Answer 1

1

Ok after a bit of digging. It turns out I was able to run this with wget. But had to comment out the &'s as these were being read as commands in cron. Also worth noting you would need to do the same with %'s as well.

So the final solution is:

wget -q -O - https://domain/index.php?p=actions/feed-me/feeds/run-task\&direct=1\&feedId=1\&passkey=xxxxxxxxxx >/dev/null 2>&1

Hope this helps anyone else with a similar issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.