Cronjob for removed project keep sending emails

I accidentally added a site in production/wordpress_sites.yml and ran ansible-playbook server.yml .... This resulted in a site configured on the server with no corresponding bedrock project on the server. I removed the site from production/wordpress_sites.ymland ran the playbook again (thought this would remove the the configured site). However the cron job for that project remains and give me the following email notification every 15 min.

Title: Cron <web@webnerds> cd /srv/www/svencristea/current && wp cron event run --due-now > /dev/null 2>&1
Content: /bin/sh: 1: cd: can't cd to /srv/www/svencristea/current

I understand the error but how do i remove this cronjob for a site that is no longer on the server?

All the cron jobs for sites created by Trellis are located in /etc/cron.d/

Just ssh into your server and delete the ones you don’t need running anymore. You don’t need to do anything else, as long as they aren’t present in that folder they won’t run anymore.

2 Likes