Cron is used to execute scheduled commands. It acts as a task scheduler on Linux and UNIX systems which will execute commands at specified times set by the user. Cron has a great deal of customization and is often used on server environments where common tasks are run on a regular basis.

learn more… | top users | synonyms (2)

3
votes
1answer
130 views

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 ...
1
vote
2answers
3k views

How can I setup nightly backups via the command line?

I'm running Ubuntu Server and I'm looking for an efficient way of performing nightly backups of particular directories using cron. However, since the computer isn't always on, I'd like it to just run ...
2
votes
2answers
912 views

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 ...
4
votes
6answers
3k views

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 ...
6
votes
5answers
9k views

What's wrong with my cron.hourly configuration?

Every hour I get an email with error like this, Subject: Cron <root@supa> root cd / && run-parts --report /etc/cron.hourly /bin/sh: root: not found Contents of /etc/crontab is as ...
150
votes
5answers
204k views

How do I set up a Cron job?

How do I add Cron jobs in Ubuntu?
39
votes
5answers
40k views

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 ...
14
votes
7answers
64k views

How to run scripts every 5 seconds using cron?

I have a script that needs to be run every five seconds. I know that cron can do tasks by the minute, but is there a way to run something every second?
25
votes
1answer
23k views

How do I make cron email my @gmail account

I have a couple of cron jobs that somethime produce error output and would like to get a notification in my "real" email account, since I don't use my user's mailbox in my Ubuntu laptop, but cron (or ...
2
votes
3answers
474 views

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 ...