Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #275420

Re: Restarting cron after crontab update

From Roger Price <roger@rogerprice.org>
Newsgroups linux.debian.user
Subject Re: Restarting cron after crontab update
Date 2024-12-09 15:50 +0100
Message-ID <JRNfb-frOB-15@gated-at.bofh.it> (permalink)
References <JRqiB-eM0Z-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, 8 Dec 2024, Greg Wooledge wrote:

> What line did you add to /etc/crontab?  Please paste it here.  Note
> that /etc/crontab uses a different format than personal crontab
> files (there's an extra username field).

I added lines to /etc/crontab such as

  # Watch over the NUT heartbeat at 0803 hr every day
  3    8    * * *  nut    /usr/local/bin/heartbeat-watcher.sh > /dev/null 2>&1
  # Lets have Biff bark the hours
  0,1  0,12 * * *  rprice /mnt/home/rprice/bark/bark.sh  12 > /dev/null 2>&1
  ...
  0,1 11,23 * * *  rprice /mnt/home/rprice/bark/bark.sh  11 > /dev/null 2>&1

> That command edits your personal crontab file, which has the shorter
> lines (no username field is needed, because all the jobs are run as
> you).

I added a username, but crontab -e didn't complain.

> I'm still suspecting you used the wrong format in one or both files,
> so it would be helpful to know what line you added to each of them,

The personal lines I specified using crontab -e were also as shown above.

> and why you were using /etc/crontab (system-wide) if your job was
> going to run as you.  I'm not saying it's *wrong* to have all your
> system-wide and personal jobs in one place, but it's non-traditional.

It was clearly a misunderstanding on my part to have additional lines in 
/etc/crontab.  I have removed them and returned /etc/crontab to what it was when 
Debian 11 was installed. All my personal lines are now specified by "crontab -e" 
and can be seen in /var/spool/cron/crontabs/rprice

Roger

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Restarting cron after crontab update Roger Price <debian@rogerprice.org> - 2024-12-08 11:30 +0100
  Re: Restarting cron after crontab update Michael Kjörling <c9bc136c6063@ewoof.net> - 2024-12-08 12:10 +0100
  Re: Restarting cron after crontab update debian-user@howorth.org.uk - 2024-12-08 13:30 +0100
    Re: Restarting cron after crontab update Roger Price <debian@rogerprice.org> - 2024-12-08 14:20 +0100
      Re: Restarting cron after crontab update Greg Wooledge <greg@wooledge.org> - 2024-12-08 15:20 +0100
        Re: Restarting cron after crontab update Roger Price <roger@rogerprice.org> - 2024-12-09 15:50 +0100
          Re: Restarting cron after crontab update <tomas@tuxteam.de> - 2024-12-09 16:00 +0100
            Re: Restarting cron after crontab update Greg Wooledge <greg@wooledge.org> - 2024-12-09 16:40 +0100
              Re: Restarting cron after crontab update Roger Price <debian@rogerprice.org> - 2024-12-09 17:50 +0100
              User "nut" (Was Re: Restarting cron after crontab update) Roger Price <debian@rogerprice.org> - 2024-12-09 18:00 +0100
              Re: Restarting cron after crontab update Darac Marjal <lists-debian-user@bendel.debian.org> - 2024-12-09 18:10 +0100
                Re: Restarting cron after crontab update Greg Wooledge <greg@wooledge.org> - 2024-12-09 19:50 +0100
            Re: Restarting cron after crontab update Greg Wooledge <greg@wooledge.org> - 2024-12-09 16:40 +0100
              Re: Restarting cron after crontab update Charles Curley <charlescurley@charlescurley.com> - 2024-12-09 18:00 +0100
            Re: Restarting cron after crontab update Charles Curley <charlescurley@charlescurley.com> - 2024-12-09 16:40 +0100

csiph-web