<p>Ok after a bit of digging. It turns out I was able to run this with wget. But had to comment out the &amp;'s as these were being read as commands in cron. Also worth noting you would need to do the same with %'s as well.</p>
<p>So the final solution is:</p>
<pre><code>wget -q -O - https://domain/index.php?p=actions/feed-me/feeds/run-task\&amp;direct=1\&amp;feedId=1\&amp;passkey=xxxxxxxxxx &gt;/dev/null 2&gt;&amp;1
</code></pre>
<p>Hope this helps anyone else with a similar issue.</p>

CC BY-SA 4.0
2021-02-24T14:20:19.693Z
2021-02-24T14:20:19.693Z
Lettie
<p>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:</p>
<pre><code>/usr/local/bin/php /home/username/public_html/index.php?p=actions/feed-me/feeds/run-task&amp;direct=1&amp;feedId=1&amp;passkey=xxxxxxx
</code></pre>
<p>However I'm getting an error:</p>
<p>Could not open input file: /home/username/public_html/index.php?p=actions/feed-me/feeds/run-task</p>
<p>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 &amp; ?</p>

CC BY-SA 4.0
2021-02-24T14:26:59.707Z
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
<plugin-feedme>
Feed Me Cron Job failing on 123-reg hosting
# Feed Me Cron Job failing on 123-reg hosting

(Asked by: username_0 on 2021-02-24)

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 & ?

**Tags:** plugin-feedme
> **Comments:**
> **username_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__;`  

---

## 1 answers

### Answer by username_0 on 2021-02-24. Score: 1 | Accepted answer

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.


---

