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)

4
votes
3answers
4k views

unattended-upgrades not running, /etc/cron.daily/apt missing

I have automatic-upgrades installed and configured, but it never seems to run, because there are always security updates waiting to be installed when I check. ...
0
votes
2answers
2k views

Cron not working

Wrote a short shell script "wallch.sh" to randomly change my desktop background: DIR="/home/user/Wallpapers" PIC=$(ls $DIR/*.jpg | shuf -n1) FIL="file://" gsettings set org.gnome.desktop.background ...
2
votes
2answers
626 views

create backup from directory

I would like to create backup from directory using cron. I wrote following command: cd path && sudo zip -r "backup-$(date +"%Y-%m-%d").zip" git/ && sudo mv "backup-$(date +"%Y-%m-%d").zip" /backup/ ...
0
votes
2answers
2k views

How to stop cron from mailing me?

I have setup a ssmtp server with my gmail username and password. After that i have been getting constant emails from my laptop to my gmail. Here the mails. The first one is somewhat like this: The ...
2
votes
2answers
53 views

Is it possible to list the actual commands that have been scheduled with `at`?

I'd like to be able to see exactly what has been scheduled with at. atq will list the job id, time to run, and user to run as, but not the actual task that will be run. Thanks! Edit I should add ...
8
votes
2answers
2k views

what can be causing /etc/cron.daily/apt to hang?

Lately I've been getting a mail from the server every day, Subject Cron <root@host> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) Body ...
2
votes
0answers
149 views

Need to setup email notification when system starts and shutdown

I would like to have the system send me a email notification everrytime the system starts or shuts down. I am currently running Ubuntu 12.10 I found this tutorial but I couldn't make it to work.
1
vote
1answer
430 views

running deja-dup as cronjob, BU disc not connected

I have a problem with my backup cronjob. I use these settings (as proposed in that post): 15 * * * * env DISPLAY=:0 /usr/bin/deja-dup --backup During runtime deja-dup says: Backup location not ...
0
votes
2answers
603 views

How to set up directory backup?

I have Ubuntu 12.10 installed running a LAMP stack for a small site I host. I need to set up a system for weekly backups of the /var/www directory where all of my sites are. What is the best possible ...
1
vote
0answers
84 views

Why are alerts still coming if a job is commented out in cron?

In cron entry I have disabled the ignite recovery tape backup. But still we are getting alerts as: The action /opt/osit/omniback/bin/check_make_recovery.pl failed Crontab entry : # Ignite ...
3
votes
1answer
760 views

root cron job not running

I am trying to configure automysqlbackup to run via a cronjob to backup my dbs nightly. When I execute sudo automysqlbackup from a terminal, the process executes as expected and creates the backup ...
1
vote
1answer
121 views

How to prevent automatic apt-get operations from running for a while?

In a production context, we run scripts to configure/customize the OS. It makes intensive use of apt-get (to install, remove, update, upgrade packages). Unfortunately it happens (especially just ...
1
vote
1answer
7k views

Thousands of pam_unix log entries in logwatch

My logwatch reports, within the CRON section, contain thousands of entries like those below. How can I either reduce the number of log entries OR have logwatch ignore them? Jan 30 18:49:01 ota3 ...
3
votes
1answer
407 views

Cannot get gsettings set to work at boot using cron, rc.local, or autostart

I am trying to "lock down" the computer by running a script at boot that turns lock on, lock screen after 10 min and require password, etc. I am using Ubuntu 12.04 I have tried editing crontab, ...
2
votes
1answer
491 views

Cronjob for security updates?

I'm having trouble creating a cronjob for automatic security updates on my ubuntu server 12.04. I separated the security sources into a different file, and then did this from within a cronjob: ...
0
votes
2answers
85 views

How to search the location of Shell Script

# 59 23 * * 1 sh /rsync01.sh # 59 23 * * 2 sh /rsync02.sh # 59 23 * * 3 sh /rsync03.sh # 59 23 * * 4 sh /rsync04.sh # 59 23 * * 5 sh /rsync05.sh # 59 23 * * 6 sh /rsync06.sh # 59 23 * * 0 sh ...
0
votes
2answers
264 views

Where should I start crond?

On my Ubuntu server (LTS 12.04) I would like crond to be running every time I boot up. Where should I configure this? I took a look at service --status-all and saw that cron was there, but it was ...
3
votes
2answers
5k views

Stop cron from mailing the user

I am facing an issue with Ubuntu server. I am running a PHP script using a cron job which executes every 5 minutes. This folder spool/mqueue is showing 112GB space. The scripts job is to fetch data ...
2
votes
1answer
482 views

What happens to cronjobs scheduled when the server is off?

I have an Ubuntu Server 12 which isn't on all day. In the /etc/crontab, I see that cron.daily, cron.weekly and cron.monthly are scheduled at times the server is off, usually. What happens with those ...
2
votes
1answer
8k views

Add cron job on startup from a script

I would like to add a command to be run at startup from within a shell script. For example, I run the script once and it adds the cron job, so from that time on, each time the OS starts, a specific ...
1
vote
3answers
18k views

Use /etc/aliases for outgoing mail relayed by postfix with local domain

I'm using Ubuntu 12.04 with postfix configured as satellite system that relays outgoing mail to Gmail. For sake of example, my registered domain is example.com I want root cronjobs' error output to be ...
8
votes
4answers
21k views

How to restart every 30 minutes automatically?

I would like to schedule a restart of my Ubuntu every 30 minutes. Is there any command or a graphical way to do it?
1
vote
3answers
2k views

Cron works, but scheduled job to open webpage in chrome does not

Updates START A friend of mine just answered this. I need to do this export DISPLAY=:0 && <my GUI dependent command here> Waiting for him to post the answer here. I have tried ...
1
vote
1answer
14k views

Daily server reboot cron?

I want to create a cron job which executes daiy at assigned time and it restart the ubuntu server. I try to add reboot only in cron, but it is not working, whereas it works when I try to execute it ...
0
votes
2answers
4k views

Wget Scheme Missing

When I run Wget from terminal with command wget targetfile.php I got error "Scheme Missing". What does it is suppose to mean and how to fix it? I googled but all links I found is speaking of drupal ...
0
votes
1answer
5k views

Crontab and Shell Script not Executing [duplicate]

Anybody any suggestions on why my crontab and shell script is not running. I have chmod +x my shell script and added the following into crontab -e */5 * * * * bash cd /home/jclark/scrips/ipcheck/ ...
4
votes
2answers
9k views

How can I disable postfix on startup?

I can't get cron to stop spamming me with completed job notifications. It's getting out of hand and starting to clog up my 'real' email server, so I'd like to just disable postfix while I figure out ...
0
votes
1answer
558 views

sqlite3 timestamp (current_timestamp) one hour off

I run a small crawler on a virtual ubuntu server, initiated by crontab hourly. Datetime is inserted by defaulting the date filed to TIMESTAMP DEFAULT CURRENT_TIMESTAMP. Table creation looks like ...
0
votes
1answer
51 views

Execure a random command from .txt file?

I have a Ubuntu server, and I'm trying to print a Twitter quote using the app "twidge". So I made a list of tweets on a .txt file. I want to print one tweet (per line) from that file and send it to ...
1
vote
0answers
209 views

How to trigger anacron start if USB drive connected

There is a script in /usr/lib/pm-utils/power.d/anacron which restarts anacron if leptops are connected to power. Is it possible to have a similar script restart anacron if (a certain) USB-drive is ...
1
vote
2answers
2k views

Auto shutdown server if there was no activity

My server should shutdown after 01:00 am, if there was no activity in the past hour. Lets say there was the last connection at 00:43 then it should check again at 01:43. How to write such a ...
1
vote
1answer
290 views

debuild -S in cronjob: how to avoid interactive gpg

I would like to build and submit a package to a launchpad Ubuntu reposiory of mine in a nightly cronjob. To this end, I'll have to debuild -S the package which by default requires human interaction ...
43
votes
3answers
68k views

“(CRON) info (No MTA installed, discarding output)” error in the syslog

I have a fresh install of Ubuntu 12.04.1 LTS an a number of servers. I have not added any cron jobs or edited my crontab on those servers, however, at around the same time for each machine, I get a ...
1
vote
1answer
579 views

Crontab opens as blank page, cannot save

I am really not familiar with linux, and only started using it recently, so be patient with me. I am trying to control a camera on regular intervals through a script that is called upon in the ...
1
vote
1answer
4k views

How to run a cronjob after every 5minutes

I've tried to run a cronjob like this: 30/5 13-14 * * * .... i.e I want to run the cron every 5minutes from 1:30PM to 2:30PM. But it doesn't seems to work. Am I doing something wrong?
-2
votes
3answers
4k views

How to run cronjob in a time specific time range

How to create a cronjob that will execute some code from 8:30AM to 8:14PM.
1
vote
1answer
221 views

Crron job not running properly

Crontab runs my script but file that are fetched are of 0 kb and when i am running my script scheduled by own i.e ./getMSC.sh $1 $2 its running and files are also fetched Please suggest me why this ...
51
votes
4answers
72k views

Where is the user crontab stored?

Since upgrading my user's crontab has been wiped out. This is not the first time this has happened this year and it's a pain restoring it each time. I'd like to be able to back up the crontab for my ...
3
votes
1answer
2k views

run script every last thursday of the month

How to make a script run at e.g. 16:00 every last thursday of the month using gnome-schedule or cron?
0
votes
2answers
1k views

How to mkdir -p -m 777 to all missing pathname directories?

I'm putting a file in cron.hourly which needs to create a folder on the 1st time, and giving it access to an user so i don't need to use sudo if i want to remove all content in the folder. And in it ...
1
vote
2answers
72 views

Crontab Instances

I have been doing some research on scheduling tasks and what not. I came across the crontab command function. Is crontab a file that is created or is it a command? If it is a file, then how many can ...
0
votes
1answer
68 views

For processes to be up and running all the time

I want my python program sample.py to be always up and running. I have read some things and asked people about ways to do this. So far I have following options - Upstart Cron I am trying things ...
2
votes
1answer
1k views

Cron script to detect degraded raid array?

To my surprise, my raid array entered degraded mode some time ago. How can I set up a cron job to warn me? I've tried from the mdadm man page: Running mdadm --monitor --scan -1 from a cron script ...
0
votes
1answer
2k views

Running CRON job on Ubuntu server for SugarCRM

I am pretty inexperienced in Linux, so be descriptive on your answer. My environment: Local Linux server 12.04 hosting Sugar CRM 6.5.2. There is area in sugar CRM called scheduler. I can configured ...
0
votes
1answer
1k views

Cron cannot run gnome-terminal

I set the following cron in my local machine. * * * * * /bin/bash -c /home/JSX/Stuff/J/login-check/open-console.sh The content of open-console.sh is the following:- #! /bin/sh gnome-terminal ...
2
votes
2answers
317 views

How to store sensitive information (passwords) so it can be accessed by cronjob?

I'm writing an extension to a python program that will need to store passwords and need to access them during non interactive cronjobs (during the user is not logged in). My first approach was to use ...
3
votes
3answers
207 views

How to run a command within a time duration per min/sec?

I want to run a command/shell script say script.sh from 1AM to 2AM per minute. After observing that crontab can't work it out 'per sec' I had to go with 'per min'. Basically, My server.sh file takes ...
4
votes
2answers
874 views

Ubuntu 12.04 isn't working with one of my crontab commands… any ideas?

In my crontab file (sudo crontab -e) I have the following commands: */1 * * * * wget -q -O /dev/null http://help.mysite.com/inc/mail/hesk_pop3.php 0 7 * * * bash -c "/home/backup/backupscript.sh" ...
2
votes
1answer
411 views

Crontab kill firefox processes

I want to make a crontab job for killing any firefox processes running, if there is more than a max number of processes running, starting with the oldest process. So let's say 5 processes is running ...
3
votes
1answer
480 views

scrot (screenshot) cron job not executing

I'm trying to execute a cron job with Scrot (screenshot utility) but it won't work. At first I thought it was a directory problem. I wrote my.png by itself at first, which could have been dropping ...