Re: [AMMRL] crontab

From: Josh Kurutz <jkurutz_at_uchicago.edu>
Date: Mon, 16 Sep 2024 15:37:53 +0000

Hi Neal.

Here’s a couple things to try:

  1. Instead of spelling out the execution commands in the crontab file, try
putting the commands in new script files. Then, in the crontab line, call that
script with its full pathname, like the /etc/cron.daily-type files. I suggest
creating a new directory for these scripts; I name mine /etc/data vailability.
See text below.
  2. I’m not certain, but it may help to specify your hour entries with
a leading zero, like “07” instead of “7”.

Good luck!

  * Josh

**** CRONTAB START ****

# Example of job definition:

# .---------------- minute (0 - 59)

# | .------------- hour (0 - 23)

# | | .---------- day of month (1 - 31)

# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...

# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat

# | | | | |

# * * * * * user-name command to be executed

0,20,40 * * * * root /etc/dataavailability/datasync400-1
#

**** CRONTAB END****

Josh Kurutz, PhD
NMR Facility Manager, Chemistry Dept.
University of Chicago
https://chemnmrlab.uchicago.edu/
jkurutz_at_uchicago.edu

> From: main_at_ammrl.groups.io on behalf of Stolowich, Neal
> Date: Monday, September 16, 2024 at 9:33 AM
> To: main_at_ammrl.groups.io <main_at_ammrl.groups.io>
> Subject: [AMMRL] crontab

Greetings!

While I'm officially retired, some odds and ends I'm trying to take care off
before I'm really retired!

And one of them is to get backups of the spectrometers to the "data station"
computer. It used to work fine when I had things set up on a RedHat system,
but since I upgraded the computer and OS to CentOS6, I have not been able
to make it work. I can run rsync at the command line and manually run backups,
but using the same crontab as I had earlier doesn't work. Attached is the
latest version. I noticed in the cron log file that the daily and hourly
cron jobs are running, but not the spectrometer backups. What am I doing
wrong or overlooking?

Thanks!

Neal



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#1618): https://urldefense.com/v3/__https://ammrl.groups=
.io/g/main/message/1618__;!!PvDODwlR4mBZyAb0!SqccPrbaOfWtGA2X7zXnhbRjGH-Ctq=
JIplQe2iCZ2vFF0gXozzAKLvuSPy87KIDargElcy_G10n_K0P0x6w$
Mute This Topic: https://urldefense.com/v3/__https://groups.io/mt/108481945=
/7559972__;!!PvDODwlR4mBZyAb0!SqccPrbaOfWtGA2X7zXnhbRjGH-CtqJIplQe2iCZ2vFF0=
gXozzAKLvuSPy87KIDargElcy_G10n_7Ntgx4Q$
Group Owner: main+owner_at_ammrl.groups.io
-=-=-=-=-=-=-=-=-=-=-=-




Received on Mon Sep 16 2024 - 08:38:04 MST

This archive was generated by hypermail 2.4.0 : Tue Oct 01 2024 - 14:06:56 MST