how to run task periodically

Jeff Laine wtf.jlaine at gmail.com
Wed Aug 18 08:42:24 UTC 2010


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


More information about the freebsd-questions mailing list