I have a shellscript in /etc/myprog/myscript.sh that I would like to run every week.
After upgrading from Mythbuntu 11.04 to 12.03 cron does not appear to be working. I have scripts in /etc/cron.daily and /etc/cron.weekly that aren't running.
HI I am new to unix .
I wanted to create a cron job that runs a script every 10 min .So when I enter
Code:
vi /etc/crontab
I get the following output
Code:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root
I have written 7 scripts all together into 1 script called runall.sh in my /home/student directory.
I want to use crontab to run this script every day at night (11:00 PM).
I have tried the following using crontab -e:
PATH=/home/student
00 23 * * * /home/student/runall.sh >> /var/log/script_output.log 2>&1
I have also tried putting this in /etc/crontab like this:
SHELL=/bin/sh
PAT
My RHEL has the following anacrontab config file, it has START_HOURS_RANGE and RANDOM_DELAY both missing, what hour does cron.daily start everyday? My guess is it is random.
My sisters machine is running ubuntu and having just logged in as root I noticed I had some emails from anacron.
These all read:
Code:
Return-Path: <root@xxx>
X-Original-To: root
Delivered-To: root@xxx
Received: by xxx (Postfix, from userid 0)
id 5B4961FF18; Wed, 1 Dec 2010 07:45:38 +0000 (GMT)
From: Anacron <root@xxx>
To: root@xxx
Subject: Anacron
I've noticed that ls -l doesn't only change the formatting of the output, but also how directory symlinks are handled:
> ls /rmn
biweekly.sh daily.sh logs ...
> ls -l /rmn
lrwxrwxrwx 1 root root 18 Feb 11 2011 /rmn -> /root/maintenance/
I'd like to get a detailed listing of what's in /rmn, not information about the /rmn symlink.
One work-around I can think of is to create a shell
I see that Ubuntu uses /etc/cron.{daily,weekly,monthly} for cron jobs. I also see that some things, like updatedb from mlocate, put their jobs there:
$ dpkg -L mlocate|grep y/m
/etc/cron.daily/mlocate
Somtetimes, I would like to disable some of these jobs (mlocate in this case). I can obviously sudo mv /etc/cron.daily/mlocate ~/cron.daily-dont-run and be over with it.
I am using a perl script to send daily status to my gmail account.
For some reason, sendmail seems to be spamming gmail although I am only sending one email
Can anybody point me towards a solution?
Mar 23 07:00:01 myhostname /USR/SBIN/CRON[16720]: (root) CMD (perl /root/daily-check.pl^I)
Mar 23 07:00:01 myhostname /USR/SBIN/CRON[16721]: (smmsp) CMD (test -x /etc/init.d/sendmail && /usr/sh