如何在Linux的周六和周日跳过cron作业? [英] How to skip the cron job in saturday and sunday in linux?

查看:472
本文介绍了如何在Linux的周六和周日跳过cron作业?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Linux中设置一个cron作业,但星期六和星期日除外.

Hi I want to setup a cron job in linux excluding saturday and sunday.

推荐答案

0 0 * * 1,2,3,4,5 <user> <command>开头.第一个字段是分钟和小时.在这种情况下,该命令将在午夜运行.星星代表:每个月的每一天,每个月. 1到5指定天数.星期一到星期五. 6 =星期六0 =星期日.

Begin the line with 0 0 * * 1,2,3,4,5 <user> <command>. The first fields are minutes and hours. In this case the command will run at midnight. The stars mean: for every day of the month, and for every month. The 1 to 5 specify the days. monday to friday. 6=saturday 0=sunday.

这篇关于如何在Linux的周六和周日跳过cron作业?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆