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.
825 0
|
应用服务中间件 Linux 开发工具
CentOS7下启动Nginx出现Failed to start nginx.service:unit not found
CentOS7下启动Nginx出现Failed to start nginx.service:unit not found
3756 0
CentOS7下启动Nginx出现Failed to start nginx.service:unit not found
|
4月前
|
网络协议 Linux
搭建FTP报错:Job for vsftpd.service failed because the control process exited with error code. See
搭建FTP报错:Job for vsftpd.service failed because the control process exited with error code. See
329 3
|
5月前
|
数据中心
【Azure Service Bus】创建 ServiceBus 的Terraform脚本报错GetAuthorizationRule: Invalid input
为了最佳的体验,需要确保使用最新 Terraform azurerm 组件!
|
6月前
|
消息中间件 开发工具
【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.
|
9月前
|
Kubernetes Docker 容器
Job for docker.service failed because the control process exited with error code.
Job for docker.service failed because the control process exited with error code.
326 0
|
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...
214 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.
872 0
|
Linux 网络安全 Docker
Docker报错:Unit firewalld.service could not be found
Docker报错:Unit firewalld.service could not be found
552 0