<!--
Hi there - thanks for filing an issue. Please ensure the following things …before creating an issue - thank you! 🤓
Since november 15th we handle all requests, except real bugs, at our community board.
Full explanation: https://community.zammad.org/t/major-change-regarding-github-issues-community-board/21
Please post:
- Feature requests
- Development questions
- Technical questions
on the board -> https://community.zammad.org !
If you think you hit a bug, please continue:
- Search existing issues and the CHANGELOG.md for your issue - there might be a solution already
- Make sure to use the latest version of Zammad if possible
- Add the `log/production.log` file from your system. Attention: Make sure no confidential data is in it!
- Please write the issue in english
- Don't remove the template - otherwise we will close the issue without further comments
- Ask questions about Zammad configuration and usage at our mailinglist. See: https://zammad.org/participate
Note: We always do our best. Unfortunately, sometimes there are too many requests and we can't handle everything at once. If you want to prioritize/escalate your issue, you can do so by means of a support contract (see https://zammad.com/pricing#selfhosted).
* The upper textblock will be removed automatically when you submit your issue *
-->
### Infos:
* Used Zammad version: 3.1
* Installation method (source, package, ..): any
* Operating system: any
* Database + version: any
* Elasticsearch version: any
* Browser + version: any
* Ticket-ID: 1058202
### Expected behavior:
Zammad shows the number of touched tickets during scheduler job runtime (exact number).
### Actual behavior:
When having more than 2.000 tickets (which is our limit per one run) Zammad will act like it did work on all tickets implied, while it doesn't.
This is confusing users, as the "processed" counts implies that Zammad worked on tickets it hasn't.
In the exact example, this happened with somewhat around 40.000 tickets - Zammad said `processed: 40.000` but in the next step also says `going to process: 38.000` which confuses.
Samples:
```ruby
#<Job id: 3, name: "magic", timeplan: {"days"=>{"Mon"=>false, "Tue"=>true, "Wed"=>false, "Thu"=>false, "Fri"=>false, "Sat"=>false, "Sun"=>false}, "hours"=>{"0"=>false, "1"=>false, "2"=>false, "3"=>false, "4"=>false, "5"=>false, "6"=>false, "7"=>true, "8"=>true, "9"=>true, "10"=>true, "11"=>true, "12"=>true, "13"=>true, "14"=>true, "15"=>true, "16"=>true, "17"=>true, "18"=>true, "19"=>false, "20"=>false, "21"=>false, "22"=>false, "23"=>false}, "minutes"=>{"0"=>true, "10"=>false, "20"=>false, "30"=>false, "40"=>true, "50"=>false}}, condition: {"ticket.close_at"=>{"operator"=>"before (relative)", "value"=>"3", "range"=>"month"}, "ticket.tags"=>{"operator"=>"contains one not", "value"=>"komplett_löschen_3m"}}, perform: {"ticket.tags"=>{"operator"=>"add", "value"=>"komplett_löschen_3m"}}, disable_notification: true, last_run_at: "2019-11-12 09:44:51", next_run_at: "2019-11-12 10:00:00", running: false, processed: 38344, matching: 36360, pid: nil, note: "magical tagging", active: true, updated_by_id: 1, created_by_id: 18, created_at: "2019-11-12 07:34:45", updated_at: "2019-11-12 09:44:51">
```
an hour later:
```ruby
#<Job id: 3, name: "magic", timeplan: {"days"=>{"Mon"=>false, "Tue"=>true, "Wed"=>false, "Thu"=>false, "Fri"=>false, "Sat"=>false, "Sun"=>false}, "hours"=>{"0"=>false, "1"=>false, "2"=>false, "3"=>false, "4"=>false, "5"=>false, "6"=>false, "7"=>true, "8"=>true, "9"=>true, "10"=>true, "11"=>true, "12"=>true, "13"=>true, "14"=>true, "15"=>true, "16"=>true, "17"=>true, "18"=>true, "19"=>false, "20"=>false, "21"=>false, "22"=>false, "23"=>false}, "minutes"=>{"0"=>true, "10"=>false, "20"=>false, "30"=>false, "40"=>true, "50"=>false}}, condition: {"ticket.close_at"=>{"operator"=>"before (relative)", "value"=>"3", "range"=>"month"}, "ticket.tags"=>{"operator"=>"contains one not", "value"=>"komplett_löschen_3m"}}, perform: {"ticket.tags"=>{"operator"=>"add", "value"=>"komplett_löschen_3m"}}, disable_notification: true, last_run_at: "2019-11-12 10:10:17", next_run_at: "2019-11-12 10:40:00", running: false, processed: 36396, matching: 34408, pid: nil, note: "magical taggingg", active: true, updated_by_id: 1, created_by_id: 18, created_at: "2019-11-12 07:34:45", updated_at: "2019-11-12 10:10:17">
```
### Steps to reproduce the behavior:
* create more than 2000 tickets
* create a scheduler that shall touch all those tickets and do something with them (e.g. add a tag)
* after runtime check what Zammad said it processed and then check what it really did process
Yes I'm sure this is a bug and no feature request or a general question.