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 22nd September 2019
stanl stanl is offline
Real Name: Stan
Port Guard
 
Join Date: Jun 2019
Posts: 26
Default root's default crontab

Root's default crontab contains lines to run /etc/daily, weekly and monthly as appropriate.
Each morning I get an email showing me the results of /etc/daily.

I've been stumbling thru OpenBSD for about 2 months now and I've never gotten anything from weekly or monthly. However, if I run weekly manually I get an email. If I run monthly manually I'm immediately returned to a prompt and get nothing.

Any advice will be appreciated.
Reply With Quote
  #2   (View Single Post)  
Old 22nd September 2019
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 203
Default

If you look closely at root's crontab you'll notice that weekly and monthly are supposed to be run at 3:30 in the morning on saturdays and 5:30 in the morning on the first of the month, respectively. Could it be that your pc is never turned on during that time?
Reply With Quote
  #3   (View Single Post)  
Old 22nd September 2019
stanl stanl is offline
Real Name: Stan
Port Guard
 
Join Date: Jun 2019
Posts: 26
Default root's default crontab

I only wish it were that simple.
I'll admit to having changed the times daily, weekly and monthly run to 1:30, 1:45 and 2:00 AM respectively but that's the only change I've made. Another line sends the system into hibernation at 2:45 AM.
So, yes the system is up when these scripts should run.
Reply With Quote
  #4   (View Single Post)  
Old 23rd September 2019
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 203
Default

Even so, I don't think there's anything wrong, unless you mangled your crontab.

The manpage monthly(8) (can also be called as daily(8) or weekly(8)) explains the scripts:
Quote:
DESCRIPTION
The three files /etc/daily, /etc/weekly, and /etc/monthly are shell
scripts run on a periodic basis by the clock daemon, cron(8). They take
care of some basic administrative tasks. Their output, if any, is mailed
to root.
(...)
/etc/monthly
This script is run monthly. It currently does the following:

- Runs the script /etc/monthly.local, if it exists.
Reply With Quote
  #5   (View Single Post)  
Old 23rd September 2019
jmccue jmccue is offline
Real Name: John McCue
Port Guard
 
Join Date: Aug 2012
Location: here
Posts: 28
Default afterboot

You should also see

Code:
man 8 afterboot
on changing /etc/mail/aliases

John
Reply With Quote
  #6   (View Single Post)  
Old 23rd September 2019
stanl stanl is offline
Real Name: Stan
Port Guard
 
Join Date: Jun 2019
Posts: 26
Default root's default crontab

Thanks to both of you for taking the time to respond.

My error was in not reading the man pages fvgit pointed me to. (In truth, it never occurred to me that those scripts would have man pages).

So, from what I gather, weekly is running as it should and monthly isn't running because monthly.local doesn't exit.

As for man (8) aferboot, I did read it when I first installed OpenBSD, but perhaps it's time to read it again, more carefully.

And so, i conttinue my journey of stumbling thru OpenBSD.

Thanks again
Reply With Quote
  #7   (View Single Post)  
Old 24th September 2019
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 203
Default

That's one of the nice things about OpenBSD, those "I never thought there'd be a manpage for that"-moments.
Reply With Quote
Reply

Thread Tools
Display Modes

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
Editor for crontab? beavers OpenBSD General 3 14th February 2018 05:10 PM
reboot FreeBSD box with crontab mfaridi FreeBSD General 1 15th October 2011 02:37 AM
default crontab fbroce OpenBSD Installation and Upgrading 13 13th September 2010 09:20 PM
Crontab won't run script Petrocelli08 FreeBSD General 4 7th March 2009 04:19 AM
Crontab not working beandip FreeBSD General 6 6th August 2008 08:33 PM


All times are GMT. The time now is 08:40 PM.


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