Skip to content

Commit

Permalink
Add purge:cronjobs task
Browse files Browse the repository at this point in the history
Ref #31126
  • Loading branch information
pgrenaud committed Jan 29, 2021
1 parent b0ddb03 commit c72ce7a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Envoy.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c72ce7a

Please sign in to comment.