<h1 dir="auto">Checklist</h1>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Enhancement%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical enhancement to an existing feature.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22Issue+Type%3A+Enhancement%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed enhancements.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/main">commit log</a><br>
to find out if the if the same enhancement was already implemented in the<br>
main branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues in this issue<br>
(If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Related Issues and Possible Duplicates</h2>

<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>Somewhat related <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="109290898" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/2834" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/2834/hovercard" href="https://github.com/celery/celery/issues/2834">#2834</a></li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h1 dir="auto">Brief Summary</h1>

<p dir="auto">Adding the same periodic task twice with different schedules unexpectedly override the first one.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="sig = add.s(2, 2)
app.add_periodic_task(10, sig)
app.add_periodic_task(20, sig)
assert len(app.conf.beat_schedule) == 1"><pre class="notranslate"><span class="pl-s1">sig</span> <span class="pl-c1">=</span> <span class="pl-s1">add</span>.<span class="pl-en">s</span>(<span class="pl-c1">2</span>, <span class="pl-c1">2</span>)
<span class="pl-s1">app</span>.<span class="pl-en">add_periodic_task</span>(<span class="pl-c1">10</span>, <span class="pl-s1">sig</span>)
<span class="pl-s1">app</span>.<span class="pl-en">add_periodic_task</span>(<span class="pl-c1">20</span>, <span class="pl-s1">sig</span>)
<span class="pl-k">assert</span> <span class="pl-en">len</span>(<span class="pl-s1">app</span>.<span class="pl-s1">conf</span>.<span class="pl-s1">beat_schedule</span>) <span class="pl-c1">==</span> <span class="pl-c1">1</span></pre></div>
<h1 dir="auto">Design</h1>
<h2 dir="auto">Architectural Considerations</h2>

<p dir="auto">None</p>
<h2 dir="auto">Proposed Behavior</h2>

<p dir="auto">Now I understand that I can just set a name explicitly to avoid the behavior, but it is not clear in the docs and looks like it could be warned/failed in runtime to improve developer experience. I tried it in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1634070086" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/8143" data-hovercard-type="pull_request" data-hovercard-url="/celery/celery/pull/8143/hovercard" href="https://github.com/celery/celery/pull/8143">#8143</a>.</p>
<h2 dir="auto">Proposed UI/UX</h2>

<h2 dir="auto">Diagrams</h2>

<p dir="auto">N/A</p>
<h2 dir="auto">Alternatives</h2>

<p dir="auto">None</p>
<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Enhancement%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical enhancement to an existing feature.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22Issue+Type%3A+Enhancement%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed enhancements.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/main">commit log</a><br>
to find out if the if the same enhancement was already implemented in the<br>
main branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues in this issue<br>
(If there are none, check this box anyway).</li>
</ul>
<h1 dir="auto">Brief Summary</h1>
<p dir="auto">The command <code class="notranslate">celery worker --help</code> gives</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Usage: celery worker [OPTIONS]

  Start worker instance.

  Examples
  --------

  $ celery --app=proj worker -l INFO $ celery -A proj worker -l INFO -Q
  hipri,lopri $ celery -A proj worker --concurrency=4 $ celery -A proj worker
  --concurrency=1000 -P eventlet $ celery worker --autoscale=10,0"><pre class="notranslate">Usage: celery worker [OPTIONS]

  Start worker instance.

  Examples
  --------

  $ celery --app=proj worker -l INFO $ celery -A proj worker -l INFO -Q
  hipri,lopri $ celery -A proj worker --concurrency=4 $ celery -A proj worker
  --concurrency=1000 -P eventlet $ celery worker --autoscale=10,0</pre></div>
<p dir="auto">This is caused by the <a href="https://click.palletsprojects.com/en/8.1.x/documentation/#preventing-rewrapping" rel="nofollow">text rewrapping of <code class="notranslate">click</code></a>. The solution is to add <code class="notranslate">\b</code> before every paragraph which results in</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Usage: celery worker [OPTIONS]

  Start worker instance.

  Examples
  --------

  $ celery --app=proj worker -l INFO
  $ celery -A proj worker -l INFO -Q hipri,lopri
  $ celery -A proj worker --concurrency=4
  $ celery -A proj worker --concurrency=1000 -P eventlet
  $ celery worker --autoscale=10,0"><pre class="notranslate">Usage: celery worker [OPTIONS]

  Start worker instance.

  Examples
  --------

  $ celery --app=proj worker -l INFO
  $ celery -A proj worker -l INFO -Q hipri,lopri
  $ celery -A proj worker --concurrency=4
  $ celery -A proj worker --concurrency=1000 -P eventlet
  $ celery worker --autoscale=10,0</pre></div>