WPguy WPguy - 2 months ago 21
PHP Question

Cronjob not working Ubuntu Server

I just finished setting up a cronjob on my server. I created my

. If I run this file via SSH with
everything its fine, its working as expected.

I added a new line within
file to run the
.sh at every 5 minutes
but its not working. I can't understand why.

Line added in crontab:

*/5 * * * * /var/www/sitename/wp-content/themes/themename/cron.sh >/dev/null 2>&1

Its a Ubuntu Server. I guess i use a wrong crontab file.

I already set 777 fron cron.sh.

Any ideas? Thank you


Ubuntu prefers to use

$ crontab -e

Instead of editing the file.

This will edit the crontab for the specific user you logged in as.