# Channel.fetch is working but not sheduled

**URL:** https://community.zammad.org/t/channel-fetch-is-working-but-not-sheduled/10029
**Category:** Technical assistance
**Created:** [September 16, 2022, 1:17pm UTC](https://community.zammad.org/t/channel-fetch-is-working-but-not-sheduled/10029 "2022-09-16T13:17:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Kound](https://community.zammad.org/user_avatar/community.zammad.org/kound/32/6254_2.png) [@Kound](https://community.zammad.org/u/Kound)
#### Post date: [September 16, 2022, 1:17pm UTC](https://community.zammad.org/t/channel-fetch-is-working-but-not-sheduled/10029/1 "2022-09-16T13:17:41Z")

</div>

### Infos:

- Used Zammad version: 5.2.2-1663055983.80ed32a9.centos7
- Used Zammad installation type: package
- Operating system: CentOS Linux release 7.9.2009

### Expected behavior:

- Emails are imported and triggers are processed automatically within 5min

### Actual behavior:

- No email are imported automatically. Running `zammad run rails c` and `Channel.fetch` will fetch the mails as expected.

- Health Status is:

```json
{
  "healthy": false,
  "message": "Failed to run scheduled job 'Check channels.'. Cause: Failed to run Channel.fetch after 11 tries.;Channel: Email::Account out Can't use Channel::Driver::Smtp: #<ActiveRecord::RecordNotFound: Can't find S/MIME encryption certificates for: nils.censored@censored.de>",
  "issues": [
    "Failed to run scheduled job 'Check channels.'. Cause: Failed to run Channel.fetch after 11 tries.",
    "Channel: Email::Account out Can't use Channel::Driver::Smtp: #<ActiveRecord::RecordNotFound: Can't find S/MIME encryption certificates for: nils.censored@censored.de>"
  ],
  "actions": [
    "restart_failed_jobs"
  ],
  "token": "censored"
}

```

Here some more debug info:

```auto
irb(main):006:0> Delayed::Job.count
=> 0
irb(main):007:0> Delayed::Job.first
=> nil
irb(main):008:0> Delayed::Job.last
=> nil
irb(main):009:0> p Scheduler.find_by(name: 'Execute jobs')
nil
=> nil

```

### Steps to reproduce the behavior:

- Sent a mail to Zammad and wait.
- The problemes started after upgrading from `zammad-5.2.1-1659072546.e6bf4d57.centos7.x86_64`

### Background

- The Certificate Error comes from usage of the S/MIME Plugin. I used the Rest API to generate an article configured to encrypt.  
In the GUI it is not possible to create an Article marked as encrypt given there is not valid certificate.
  - Still this was not a problem with the version before
  - I couldn’t get rid of the message deleting all Articles containing the wrong message. Only deleting the complete mail account helped
  - Still after deleting it, the sheduler seems not work. New mails are not processed automatically.

- All email accounts are green in the the Settings but one email account that we use for testing purposes is disabled.

Maybe Related:

- [Zammad not checking email, but Channel.fetch works](https://community.zammad.org/t/zammad-not-checking-email-but-channel-fetch-works/4918)
- [Scheduler may not run after update 5.0.3 -\> 5.2.1 - #3 by ecomsilio](https://community.zammad.org/t/scheduler-may-not-run-after-update-5-0-3-5-2-1/9776/3)

---

<div class="post-metadata">

### Author: ![Kound](https://community.zammad.org/user_avatar/community.zammad.org/kound/32/6254_2.png) [@Kound](https://community.zammad.org/u/Kound)
#### Post date: [September 16, 2022, 1:54pm UTC](https://community.zammad.org/t/channel-fetch-is-working-but-not-sheduled/10029/2 "2022-09-16T13:54:07Z")

</div>

Okay I found the Solution.

Under `Settings > System > Monitoring > Current Status` was button that gave the possibility to perform the `restart_failed_jobs` action.

Doing so everything works now as expected again.

---

<div class="post-metadata">

### Author: ![system](https://community.zammad.org/uploads/default/original/1X/5c5afaea2d23f811dbec33cd4edb02fa29d3262f.png) [@system](https://community.zammad.org/u/system)
#### Post date: [January 14, 2023, 1:54pm UTC](https://community.zammad.org/t/channel-fetch-is-working-but-not-sheduled/10029/3 "2023-01-14T13:54:23Z")

</div>

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
