diff --git a/Envoy.blade.php b/Envoy.blade.php index fe06a43..71ee811 100644 --- a/Envoy.blade.php +++ b/Envoy.blade.php @@ -277,6 +277,21 @@ rm $FILE @endtask +@task('purge:cronjobs') + FILE=$(mktemp) + crontab -l > $FILE || true + + sed -i '/# EXOLNET-LARAVEL-ENVOY BEGIN {{ $fingerprint }}/,/# EXOLNET-LARAVEL-ENVOY END {{ $fingerprint }}/d' $FILE + + if [ -s $FILE ]; then + crontab $FILE + else + crontab -r || true + fi + + rm $FILE +@endtask + @task('deploy:published') true @endtask