[TriLUG] crontab question

William Sutton william at trilug.org
Wed Sep 8 10:06:22 EDT 2004


Hmm, well, a couple observations:
1. Your cron entry is deficient in terms of the number of parameters (see 
http://www.pantz.org/os/linux/programs/cron.shtml for a decent explanation 
of how they layout) so either you condensed it when you posted the entry 
or Kcron messed up (my guess is more likely Kcron)
2. I don't think the leading "-" is a valid entry.  I know it's used as a 
range delimiter, but when I ran a sample script via vcron, it got ignored:

script:
-----
corran:~$ cat test.pl
#!/usr/bin/perl
use File::Slurp;

my $date = `date`;
my $file = "/home/william/test_file.txt";

write_file($file, $date);
-----

crontab:
-----
corran:~$ crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.19703 installed on Wed Sep  8 08:52:35 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
-1 * * * * /home/william/test.pl
-----

and the test file written:
-----
corran:~$ ll test_file.txt
-rw-r--r--    1 william  users          29 Sep  8 09:01 test_file.txt
-----

Basically I think Kcron is broken :)

William

On Wed, 8 Sep 2004, Michael Hrivnak wrote:

> What does it mean for the minute parameter in a crontab entry to begin with a 
> "-" ?
> 
> for example, Kcron created this...
> 
> -10 2,14	/path/to/some/script
> 
> The script in question calls rsync.  I've been having a problem recently that 
> a large number of instances of rsync get started on this client, along with 
> an equivalent number of instances of rsync and sshd on the server side, 
> resulting in a DoS.  When I run the script on its own though, it runs fine.
> 
> Any clues?
> 
> Michael
> 




More information about the TriLUG mailing list