Title: [BUG + REFACTOR] Change behavior of `JobQueue.run_monthly` · Issue #2627 · python-telegram-bot/python-telegram-bot · GitHub
Open Graph Title: [BUG + REFACTOR] Change behavior of `JobQueue.run_monthly` · Issue #2627 · python-telegram-bot/python-telegram-bot
X Title: [BUG + REFACTOR] Change behavior of `JobQueue.run_monthly` · Issue #2627 · python-telegram-bot/python-telegram-bot
Description: Steps to reproduce job_queue.run_monthly(day=30, day_is_strict=False) Expected behaviour Runs on 30th day of each month excluding Feb + on Feb 28th/29th Actual behaviour Runs on 30th and 31st day of each month excluding Feb + on Feb 28th...
Open Graph Description: Steps to reproduce job_queue.run_monthly(day=30, day_is_strict=False) Expected behaviour Runs on 30th day of each month excluding Feb + on Feb 28th/29th Actual behaviour Runs on 30th and 31st day o...
X Description: Steps to reproduce job_queue.run_monthly(day=30, day_is_strict=False) Expected behaviour Runs on 30th day of each month excluding Feb + on Feb 28th/29th Actual behaviour Runs on 30th and 31st day o...
Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/2627
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG + REFACTOR] Change behavior of `JobQueue.run_monthly`","articleBody":"### Steps to reproduce\r\n1. `job_queue.run_monthly(day=30, day_is_strict=False)`\r\n\r\n### Expected behaviour\r\nRuns on 30th day of each month excluding Feb + on Feb 28th/29th\r\n\r\n### Actual behaviour\r\nRuns on 30th *and* 31st day of each month excluding Feb + on Feb 28th/29th\r\n\r\nThis happens because I didn't pay enough attention when writing this:\r\n\r\nhttps://github.com/python-telegram-bot/python-telegram-bot/blob/0c5085022ceaa854baf267b9dd82e0010ec7e4c8/telegram/ext/jobqueue.py#L364-L384\r\n\r\nHowever, the use case of `day_is_strict` is mainly \"run on the last day of the month\". I therefore suggest to just drop the parameter and instead allow to pass `day='last'` or `day=-1` (I like this one better) to indicate that you want to run the job on the last day of the month.\r\nThe use case described above can still be achieved with `run_custom`.\r\n","author":{"url":"https://github.com/Bibo-Joshi","@type":"Person","name":"Bibo-Joshi"},"datePublished":"2021-08-11T08:55:43Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/2627"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:982dc661-6973-7698-e677-d5a71e985ee6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC94:110357:6BF004:8CF104:6B0255EB |
| html-safe-nonce | 136cc47a51c4073c0e468d45bcbc044823e4aef4b52d07703a1845ef79272c43 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzk0OjExMDM1Nzo2QkYwMDQ6OENGMTA0OjZCMDI1NUVCIiwidmlzaXRvcl9pZCI6IjY4NDkwMzE5NjMyODY4NTMwOTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d3562491e93ef21b835597ca9e36daacaf0e995686386d551991a296542c4569 |
| hovercard-subject-tag | issue:966272023 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-telegram-bot/python-telegram-bot/2627/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d6907493990250d51c987bac2d3a1edf4cf263cd37e20994d51a331fbbe6757f/python-telegram-bot/python-telegram-bot/issues/2627 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d6907493990250d51c987bac2d3a1edf4cf263cd37e20994d51a331fbbe6757f/python-telegram-bot/python-telegram-bot/issues/2627 |
| og:image:alt | Steps to reproduce job_queue.run_monthly(day=30, day_is_strict=False) Expected behaviour Runs on 30th day of each month excluding Feb + on Feb 28th/29th Actual behaviour Runs on 30th and 31st day o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Bibo-Joshi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-telegram-bot/python-telegram-bot git https://github.com/python-telegram-bot/python-telegram-bot.git |
| octolytics-dimension-user_id | 16178365 |
| octolytics-dimension-user_login | python-telegram-bot |
| octolytics-dimension-repository_id | 38696925 |
| octolytics-dimension-repository_nwo | python-telegram-bot/python-telegram-bot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38696925 |
| octolytics-dimension-repository_network_root_nwo | python-telegram-bot/python-telegram-bot |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width