deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box

Home Page:https://deployer.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nesting crontab config doesn't work

SimJoSt opened this issue · comments

  • Deployer version: 7.3.3
  • Deployment OS: Ubuntu 22.04
import:
  - contrib/crontab.php

config:
  crontab:
    identifier: 'application'
    jobs:
      - '* * * * * cd {{current_path}} && {{bin/php}} wp-cron.php >> /dev/null 2>&1'

As nesting is supported by the hosts node, supporting multiple remote hosts, I tried the same in the config node with the crontab config. Unfortunately, this configuration threw the following "error" (it just didn't recognize the config was set):

➜  dep crontab:sync
task crontab:sync
[linode.coders.fail] Nothing to sync - configure crontab:jobs

We had to switch to the following configuration, listing each option for crontab directly instead of nesting it:

config:
  ssh_copy_id: false
  crontab:identifier: 'hellseatic'
  crontab:jobs:
      - '* * * * * cd {{current_path}} && {{bin/php}} wp-cron.php >> /dev/null 2>&1'

Since the rewrite it seems to be mandatory, to provide an identifier, so the sections in the crontab work.
It would also be great if it would work without one, using a fallback. That's another story, though.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar