Questions tagged [cron-jobs]
22 questions
73
votes
6 answers
Cron.hourly won't run
Ok, So I've made my script, I dropped it in /etc/cron.hourly then I chmod 777 the file but it won't run (automatically). If I manually run it, it works fine. Do I need to do anything else?
Switchkick
- 3,963
66
votes
6 answers
How are administrators supposed to read root's mail?
What is the Ubuntu way for system administrators to receive system notifications, which typically take the form of e-mail sent to the root account?
Examples of such notifications are the output of cron jobs, or degraded RAID notifications.
On a…
Gilles 'SO- stop being evil'
- 61,858
43
votes
4 answers
At what time does cron execute daily scripts?
If I place a shell script in /etc/cron.daily/, at what time of the day will it be executed?
Malabarba
- 10,546
24
votes
3 answers
Function of /etc/cron.hourly
If I create a script and then place it in this folder (/etc/cron.hourly), will my system run this script hourly? Or does my script need to begin with a command as well?
Switchkick
- 3,963
19
votes
3 answers
How can I setup a Mail Transfer Agent?
I intend to use mutt to send automated emails via cron or at with attachments to my gmail address when particular events happen on my Ubuntu server. Currently, mutt cannot send email to external email addresses, I believe this is because I need to…
conorgriffin
- 1,007
17
votes
4 answers
What kind of harm there is from removing (purging) package apt-xapian-index?
I know you can't use Quick filter in Synaptic after purging apt-xapian-index, but is there something more severe?
I know there are some performance issues, when you have…
jarno
- 6,175
10
votes
9 answers
How to run cron job when network is up?
I have some anacron jobs which run daily. The scripts update local bzr and git repositories. Naturally these scripts need working network connections. I'm on a laptop and often wired and wireless internet do not come up fast enough. This causes my…
Dima
- 9,955
7
votes
5 answers
What's wrong with my cron.hourly configuration?
Every hour I get an email with error like this,
Subject: Cron root cd / && run-parts --report /etc/cron.hourly
/bin/sh: root: not found
Contents of /etc/crontab is as follows, either I remove user "root" or not (6th column), I get…
grokus
- 631
5
votes
2 answers
How can I use cron to schedule a script that implements daylight saving on a non- DST aware application when my server automatically uses DST?
My server (running ubuntu 8.04LTS server) reports the time as 9:38PM BST right now. BST (British Summer Time) is 1 hour ahead of UTC (or Greenwich Mean Time if you really want to confuse matters)
The act of parliament defines that we in the UK use…
Neil Trodden
- 517
5
votes
1 answer
How to start a job at precise time?
I want to start a recording job at a precise time. As I understand cron only guarantees a job to be started within a minute.
One possible solution is to start the cron job earlier and than wait until the precise time. What other possibilities do I…
Peter Hoffmann
- 267
4
votes
1 answer
Is it safe to uninstall anacron?
I have my desktop system running continually without shutdown and I want to get normal times (3:01, 4:15, 5:30) for cron.(daily|weekly|monthly) jobs but when anacron is installed these jobs run at around 7:30 and there is seems to be no interval…
AlexD
- 228
4
votes
3 answers
Backup bash script is not gzipping its tarball
I have a bash script that runs as a cron to backup files on the server.
#!/bin/bash
FILE=/path/to/backup_$(date +%Y%m%d).tar
tar -cf $FILE /backup/this /and/that /and/someotherfiles
gzip $FILE
When I run the script directly using:
sudo bash…
bcmcfc
- 848
3
votes
1 answer
Using % in a cron command
Since the % has special meaning to cron, how do I use it as part of a command?
I found this page http://www.hcidata.info/crontab.htm, which mentions piping echo and sed to escape the % and then remove the extra \, but in my case, the command is…
Ivan
- 475
2
votes
1 answer
cron.weekly does not run
I have a shellscript in /etc/myprog/myscript.sh that I would like to run every week. Therefore I created a symbolic link in /etc/cron.weekly:
root@ip-10-190-199-197:/etc/cron.weekly# ls -ltr
total 8
-rwxr-xr-x 1 root root 895 2011-07-27 11:32…
Jeroen Ooms
- 637
2
votes
3 answers
Wallpaper change crontab jobs not working after upgrade from 8.04 to 10.04
I have a crontab job set. It is a script to change the Desktop background wallpaper every 3 minutes. It was perfectly working before upgrading from Hardy to Lucid. When upgraded to Lucid, the wallpaper changes only when I login. It shows new…