Re: Cron job not working



Vilmos Soti wrote:

Starrena <starr.corbin@xxxxxxxxx> writes:

On Aug 15, 4:27 pm, Starrena <starr.cor...@xxxxxxxxx> wrote:
I do a crontab -e and write:

0 0 1,15 * root /v/filename.sh > /tmp/directory/logfile.txt

Check out crontab(5). I don't think you need the "root" directive.
Crontab(5) mentions that it exists only in /etc/crontab but not in
the other cron files.

0 0 1,15 * * root /v/filename.sh > /tmp/directory/logfile.txt

OK.

Vilmos

You can include the following comments at the beginning of your crontab
jobs. It will help you to remember the format and the meaning of each
field :

# minute (0-59),
# | hour (0-23),
# | | day of the month (1-31),
# | | | month of the year (1-12),
# | | | | day of the week (0-6 with 0=Sunday).
# | | | | | commands
0 0 1,15 * * /v/filename.sh > /tmp/directory/logfile.txt

If your script needs to be executed with root rights make it owned by root
and give it suid bit. Or put it as a cron job of root itself.


.



Relevant Pages

  • Re: Dying processes (inetd, cron, syslogd, sshd)
    ... > rsync command that is used. ... if you used to have a command like this running on boxaa: ... Who's cron job calls the shots? ... uid = root ...
    (comp.unix.sco.misc)
  • Re: Problems with mmdf / uucp and lock file
    ... We are having issues with our file systems every now and then and I ... stamps and the first message left(same time stamp as root.lock) in / ... root, the root.lock file is liable to be left behind. ... I know this could be solved with a simple cron job to do some extra ...
    (comp.unix.sco.misc)
  • Re: Time Sync
    ... You could create a cron job in root and have it run daily. ... # crontab crontab.txt ... You can verify that it is set by typing... ...
    (Fedora)
  • Re: cron jobs + (some?) output
    ... > I run mplayer from a script in the early morning as a cron job. ... it gets sent to root! ... If you want to stop this, you can redirect the output of the mplayer to ... This command will create a new log every day, ...
    (Debian-User)
  • Re: PATH braincramp
    ... When I run flexbackup from a cron job (as root), ... I feel like a dope, but a dope that has his backup crons running, now. ...
    (freebsd-questions)