From owner-freebsd-questions@FreeBSD.ORG Wed Aug 18 08:42:24 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BD081065674 for ; Wed, 18 Aug 2010 08:42:24 +0000 (UTC) (envelope-from wtf.jlaine@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8DE078FC0C for ; Wed, 18 Aug 2010 08:42:23 +0000 (UTC) Received: by eyh6 with SMTP id 6so137892eyh.13 for ; Wed, 18 Aug 2010 01:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :organization:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=/2nDw1rqu2uCWdCq+ZAd0UpY0q/Gri9fJr6mXj57qiI=; b=dnzKE6YMNk7rT8VHKsMJf7rk26sheHmstQYtvdRoGQJhGe76F8rihpUbFwD6+dHsLE 1bqoZt5Scpjy76beFVXPgCrUrqlHxLboH5Bg5nYqGykn1HmUPlqkR8bdT08l6KHHPysi 2Eszam+g657SJQfkqHGqZgh89YCeQybIoBzKg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:organization:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; b=kCJiaEQH2sx4JoxIQ0WHM9UPaYAWUvRnWa8Bj3zmaHt0sJTfBSvdk3acySF1Ocx7lq 2FwfshH00uG69vnil2KMuLGlU311IsxPyC/ZinLTWxpxjBBINZgY8Q2U0mebjEhZ7mYe 44Mp8XPB8ChHj3CnJ6rxPMCUwULZe/6kISWNo= Received: by 10.213.97.129 with SMTP id l1mr1790272ebn.56.1282120942550; Wed, 18 Aug 2010 01:42:22 -0700 (PDT) Received: from freebsd.wsru.t2ru ([80.237.90.124]) by mx.google.com with ESMTPS id u9sm33079eeh.5.2010.08.18.01.42.20 (version=SSLv3 cipher=RC4-MD5); Wed, 18 Aug 2010 01:42:21 -0700 (PDT) Message-ID: <4C6B9CEA.5070603@gmail.com> Date: Wed, 18 Aug 2010 12:42:18 +0400 From: Jeff Laine Organization: Aperture AI research User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100816 Thunderbird/3.1.2 MIME-Version: 1.0 To: Mark Stapper References: <4C6B847A.5090408@mapper.nl> In-Reply-To: <4C6B847A.5090408@mapper.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-questions@freebsd.org" Subject: Re: how to run task periodically X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2010 08:42:24 -0000 On 08/18/2010 10:58, Mark Stapper wrote: > Hi, > > I have a system that doesn't run 24/7/365. > I would like to make sure that some tasks (like updating the ports tree) > run weekly/monthly etc. > As the system isn't on 24/7 the cron job I usually run for these tasks > doesn't work as the machine isn't always running on the scheduled time. > > So I need a utility that enable me to say: "if a week has passed since > the last run, run this command". > Is there such a utlility? > Cheers, > Mark > Maybe @reboot action of standard crontab will suit your needs. Also it wouldn't be that hard to write a simple shell-script which will check dates and perform needed actions. -- Best regards, Jeff