Skip to content

Does not install Cron jobs for Ubuntu 22.04 #11

@utking

Description

@utking

php bin/console ecentria:crontab:install -vvv finishes with no output and exit code 0. The source file jobs.crontab is present and owned by the user who installs it.
The difference for the OS where it worked (CentOS7) and Ubuntu 22.04 is that on CentOS7 it was /var/spool/cron/USER_NAME while on Ubuntu 22.04 it is /var/spool/cron/crontabs/USER_NAME.
Manual installation with sudo -u USER_NAME crontab PATH_TO_CRONTABS_TO_INSTALL/jobs.crontab works though.

PS: The code was migrated to a new host. This part $changed = $this->executor->dump(); does not see the change on the source (jobs.crontab) and thus does not install it even if it's missing in /var/spool/cron/....
The fix would probably be check not only if it changed but also if it is currently installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions