Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

philipb2's avatar

Cronjob in Forge not firing

Have I misunderstood how the cronjobs working Forge? I have been googling but without any luck.

I used to have a cronjob like this using ServerPilot:

0 5 * * * wget -q -O - "https://www.example.co.uk/wp-cron.php?export_key=YvEJ2LpicGs4&export_id=1&action=trigger"

So I have set it up like this in Forge /home/forge/www.example.co.uk/public/wp-cron.php?export_key=YvEJ2LpicGs4&export_id=1&action=trigger

Time setting can be seen here: https://cl.ly/3n2R2A0x011P

However it has not fired so it seems like I have done it wrong.

Thank you

0 likes
4 replies
bheath's avatar

I assume you have php before the path in forge?

You can also look in the logs. I don't remember where they are off hand, but I think its like ~/.logs or something like that

philipb2's avatar

Thanks for replying.

No I don’t have php in front. I assume I need to based on your question. It that correct?

ejdelmonico's avatar
Level 53

Yes, you need to tell the system how to do the task, so php is needed. An example:

$   crontab -e

* */2 * * * php /var/www/html/script.php

philipb2's avatar

I ended up using crontab -e instead. Couldn't get it work by using Forge dashboard.

Thanks for the answer though.

Please or to participate in this conversation.