9-11|Unit cron.service could not be found.

简介: 9-11|Unit cron.service could not be found.

如果在尝试检查`cron`服务时得到“Unit cron.service could not be found.”的消息,这可能意味着你的系统上没有安装`cron`服务。

以下是如何根据你的Linux发行版安装和启动`cron`服务的步骤:

1. **Debian/Ubuntu**:

  ```bash

  sudo apt-get update

  sudo apt-get install cron

  sudo systemctl start cron

  sudo systemctl enable cron

  ```

2. **Red Hat/CentOS/Fedora**:

  ```bash

  sudo yum install cronie   # 对于CentOS/Red Hat

  sudo dnf install cronie   # 对于Fedora

  sudo systemctl start crond

  sudo systemctl enable crond

  ```

3. **Arch Linux**:

  ```bash

  sudo pacman -S cronie

  sudo systemctl start cronie

  sudo systemctl enable cronie

  ```

4. **openSUSE**:

  ```bash

  sudo zypper install cron

  sudo systemctl start cron

  sudo systemctl enable cron

  ```

一旦`cron`服务安装并启动,你的`crontab`任务应该开始按计划执行。在这之后,你可以再次使用`systemctl status`命令来检查`cron`(或`crond`、`cronie`,这取决于你的发行版)服务的状态。


相关文章
|
Ubuntu 网络安全
Unit firewalld.service could not be found.
Unit firewalld.service could not be found.
750 0
|
4月前
|
消息中间件 开发工具
【Azure Service Bus】Service Bus SDK 抛出 ERROR c.a.c.a.i.ActiveClientTokenManager - Error is transient. Rescheduling authorization task at interval 1079000 ms.
【Azure Service Bus】Service Bus SDK 抛出 ERROR c.a.c.a.i.ActiveClientTokenManager - Error is transient. Rescheduling authorization task at interval 1079000 ms.
Field userMapper in zero.file.videoProject.service.UserService required a bean of type ‘zero.file.vi
Field userMapper in zero.file.videoProject.service.UserService required a bean of type ‘zero.file.vi
|
5月前
|
Java Spring
Description:Field contentMapper in worldtolingyidianke.file.service.impl.ContentServiceImpl requir
Description:Field contentMapper in worldtolingyidianke.file.service.impl.ContentServiceImpl requir
|
Java
解决:Config service failed to start in 120 seconds! Please check ./service/apollo-service.log...
解决:Config service failed to start in 120 seconds! Please check ./service/apollo-service.log...
172 0
|
网络协议
Job for named.service failed because the control process exited with error code.
Job for named.service failed because the control process exited with error code.
832 0
|
Linux 网络安全 Docker
Docker报错:Unit firewalld.service could not be found
Docker报错:Unit firewalld.service could not be found
507 0
|
Java 开发工具
gradle Could not create service of type CrossBuildFileHashCache using BuildSessionScopeServices.crea
gradle Could not create service of type CrossBuildFileHashCache using BuildSessionScopeServices.createCrossBuildFileHashCache().
6792 0