# הגדרת טיימר בעבר נראית לא עובדת, אבל היא כן

**URL:** <https://meta.discourse.org/t/setting-a-timer-in-the-past-seems-to-not-work-but-it-does/168252>\
**Category:** Bug\
**Created:** [26 באוקטובר,‏ 2020,‏ 7:28am UTC](https://meta.discourse.org/t/setting-a-timer-in-the-past-seems-to-not-work-but-it-does/168252 "2020-10-26T07:28:57Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)\
**Post date:** [26 באוקטובר,‏ 2020,‏ 7:28am UTC](https://meta.discourse.org/t/setting-a-timer-in-the-past-seems-to-not-work-but-it-does/168252/1 "2020-10-26T07:28:57Z")

</div>

I often use the `POST /t/:topic_id/timer` action to change topic categories (from private to public).

This works fine if the `time` parameter is in the future, but if I use the current time (or a past time by mistake), I get a valid response but the category change does not happen instantaneously.

It usually takes 5-10 minutes, which can be confusing (I’m assuming this is due to the frequency of an internal polling loop).

Here is an example request (past time) and response:

```plaintext
# Request
POST /t/4378/timer HTTP/1.1
Accept: application/json, */*;q=0.5
Accept-Encoding: gzip, deflate
Api-Key: REDACTED
Api-Username: REDACTED
Connection: keep-alive
Content-Length: 96
Content-Type: application/json
Host: REDACTED
User-Agent: HTTPie/2.2.0

{
    "category_id": "54",
    "status_type": "publish_to_category",
    "time": "2020-10-26 08:09:45+01:00"
}

# Response
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/json; charset=utf-8
Date: Mon, 26 Oct 2020 07:09:46 GMT
Referrer-Policy: strict-origin-when-cross-origin
Server: nginx/1.18.0 (Ubuntu)
Strict-Transport-Security: max-age=63072000;
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-Discourse-Route: topics/timer
X-Discourse-Username: REDACTED
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Request-Id: REDACTED
X-Runtime: 0.055819
X-XSS-Protection: 1; mode=block

{
    "based_on_last_post": false,
    "category_id": 54,
    "closed": false,
    "duration": null,
    "execute_at": "2020-10-26T07:09:45.000Z",
    "success": "OK"
}

```

**Update** : I thought this was exclusive to the API, but it can also be a problem in the UI because even though you can’t select a date in the past, you can select a time in the past.

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/0/d0501cf9c9f1d2200ee5554db4073afd1c7f5846.png)

The behavior is the same: no indication that a timer has been set, but it still goes off anywhere between 5-10 minutes after being created.

---

_[View the full topic](https://meta.discourse.org/t/setting-a-timer-in-the-past-seems-to-not-work-but-it-does/168252)._
