Crontab:sync keeps duplicating the section and creating new jobs #4085
Unanswered
danielgwood
asked this question in
Bugs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Deployer Version
v7.5.12
Target OS
CentOS 7
Which PHP version are you using?
PHP 8.2
Content of deploy.php or deploy.yaml
Steps to reproduce
I've been trying to work out why every time I run crontab:sync (which I would normally do after deploy:success) always creates a new section in the crontab file, rather than replacing the existing jobs like it should.
Having resorted to basically recreating the contrib/crontab file myself, I think the problem is here:
deployer/contrib/crontab.php
Line 155 in 3fa0a7c
If I'm not mistaken, this assumes that PHP_EOL is the same on the source and the target host. So, if for some horrible reason you were using Windows but your target host was Linux based, the crontab:sync code would always fail to sync.
Beta Was this translation helpful? Give feedback.
All reactions