Cron job has literal ${WP_HOME}

Hey everyone, I’ve run into an odd problem. My cron jobs are not running on my trellis site. My cron job for my development/production sites contain this line:

*/15 * * * * vagrant curl -k -s ${WP_HOME}/wp/wp-cron.php > /dev/null 2>&1

It seems like WP_HOME is not being correctly set in the cron file, so the cron job fails. Has anyone else run into an issue like this before?

Well that’s a bug! Mind opening an issue on the GitHub repo?

Having the same issue, have looked at https://github.com/roots/trellis/issues/581. Is there a simple way to fix this without updating all of trellis?

You can just apply the diff from https://github.com/roots/trellis/commit/f07bf72bcd5d7107c6f1aeeb042eb8b06cf8cee3

It’s only about 3-4 lines.

1 Like

For anyone following, this was solved by https://github.com/roots/trellis/pull/533

thanks, easy enough! @swalkinshaw