Skip to content

Cron install / remove via command messes up stderr 2>&1 entries #11586

Closed
@adrian-martinez-interactiv4

Description

Installing or removing crontab via command adds 2>&1 repeatedly, even for crontab entries not related with Magento, if they match a regular expression. See details below.

Preconditions

  1. Magento2 develop branch
  2. PHP 7.0.15

Steps to reproduce

  1. Set up a crontab entry like this one:
    captura de pantalla 2017-10-20 a las 19 28 45
  2. Run bin/magento cron:install
  3. Check crontab via crontab -l
  4. Run bin/magento cron:remove
  5. Check crontab via crontab -l

Expected result

  1. Magento crontab gets installed, then removed and external crontab entry remains as it is

Actual result

  1. After installed, additional 2>&1 gets added:
    captura de pantalla 2017-10-20 a las 19 29 31
  2. After removed, also additional 2>&1 gets added:
    captura de pantalla 2017-10-20 a las 19 30 04

This also applies to other Magento2 installations crontab entries:
captura de pantalla 2017-10-20 a las 4 16 56

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.2.xThe issue has been fixed in 2.2 release lineIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions