From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5658A13838B for ; Fri, 19 Sep 2014 04:21:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0CB41E091A; Fri, 19 Sep 2014 04:21:52 +0000 (UTC) Received: from mail119c7.megamailservers.com (mail104c7-2520.megamailservers.com [69.49.98.20]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 198BBE08ED for ; Fri, 19 Sep 2014 04:21:50 +0000 (UTC) X-POP-User: admin@sys-concept.com X-VIP: 69.49.109.100 Received: from syscon7.localdomain (S01060050da7ae68c.ed.shawcable.net [68.149.90.13]) by mail119c7.megamailservers.com (8.13.6/8.13.1) with ESMTP id s8J4Lm21026597 for ; Fri, 19 Sep 2014 00:21:49 -0400 Received: by syscon7.localdomain (Postfix, from userid 1000) id 94C7820027C; Thu, 18 Sep 2014 22:21:58 -0600 (MDT) Date: Thu, 18 Sep 2014 22:21:58 -0600 From: Joseph To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] crontab - "and' condition Message-ID: <20140919042158.GJ32767@syscon7> References: <20140918164457.GB32767@syscon7> <541B12DD.5070105@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline In-Reply-To: <541B12DD.5070105@gmail.com> User-Agent: Mutt/1.5.22 (2013-10-16) X-CTCH-RefID: str=0001.0A020202.541BAF5E.0008,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.1 cv=b+2LvL2x c=1 sm=1 tr=0 a=C3ZDv51cNVt4vJz/79I2xQ==:117 a=C3ZDv51cNVt4vJz/79I2xQ==:17 a=SDcUNfBxAAAA:8 a=BDKbP5mgAAAA:8 a=Unq3plm5DvEA:10 a=M1kyBYkWWGkA:10 a=DbIW2Qp8qwkA:10 a=n4d91L2ER24A:10 a=nDghuxUhq_wA:10 a=8nJEP1OIZ-IA:10 a=pGLkceISAAAA:8 a=n7Z4KuvS1kS2IDeEUx8A:9 a=wPNLvfGTeEIA:10 X-Origin-Country: CA X-Archives-Salt: d1c267e4-30cf-4ea1-9c0c-356edfe76b5e X-Archives-Hash: 444630c75b7b86aea2bff61c81f38999 On 09/18/14 19:14, Alan McKinnon wrote: >On 18/09/2014 18:44, Joseph wrote: >> I want to run a cron job only once a month. The problem is the computer >> is only on on weekdays Mon-Fri. 1-5 >> >> cron tab as this below is an "or" condition as it has entries in Days of >> the Months and Day of the Week >> >> 5 18 1 * 2 rsync -av ... >> >> so it will run on days 1 or Tuesday of each months. >> >> Is it possible to create "and" condition, eg. run it on Tuesday between >> days 1 to 7; depend on which day Tuesday falls on? > > >Not in one line. > >Split it into two crontab entries. Interesting. How do you split cron job? I couldn't find any examples. -- Joseph