DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 7th January 2020
beavers beavers is offline
Shell Scout
 
Join Date: Nov 2017
Posts: 85
Default root's crontab vs daily.local

Are there any "best practices" guidelines regarding whether to add reoccurring jobs to {daily|weekly|monthly}.local versus root's crontab? The local files all run from root's tab, so I'm not 100% sure why some jobs would need to be separated out into separate daily/weekly/etc files.
Reply With Quote
  #2   (View Single Post)  
Old 7th January 2020
ip6ix's Avatar
ip6ix ip6ix is offline
Fdisk Soldier
 
Join Date: Sep 2017
Posts: 66
Default

The /etc/{daily,weekly,monthly} scripts (which may include custom (.local) additions) are all concerned with system maintenance tasks. Commands run from cron(8) on the other hand, are more concerned with running tasks other than system maintenance related ones.

For example, my personal crontab(5) contains a command to run a reminder service at 2am. Root's crontab(5) runs the /etc/{daily,weekly,monthly} scripts and could be used to run system maintenance tasks especially if it was important for those tasks to be run at a specific time.
__________________
dc -e '[q]sa[ln0=aln256%Pln256/snlbx]sb12247225403800449909543746snlbxq'

Last edited by ip6ix; 7th January 2020 at 10:55 PM. Reason: clarification
Reply With Quote
  #3   (View Single Post)  
Old 8th January 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

I use daily.local(8) and weekly.local(8) scripts on production servers for maintenance tasks. Since the infrastructure to run them through cron(8) is already pre-existing, they are easier to manage than setting up separate cron() jobs.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
root's default crontab stanl OpenBSD General 6 24th September 2019 05:03 PM
Daily Insecurity Output stanl OpenBSD Security 2 8th August 2019 02:12 PM
/etc/daily gives incorrect warning acampbell OpenBSD General 8 12th May 2017 04:12 AM
FreeBSD server, Windows clients, daily backups Weaseal FreeBSD General 4 25th December 2008 05:50 PM
Attention A Nwe Local Root Exploit t4y4n OpenBSD General 6 2nd July 2008 01:23 AM


All times are GMT. The time now is 06:57 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick