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)

1
vote
1answer
240 views

Refresh database in banshee

I have a library of around 20k songs and it takes forever to banshee to index it. I would like to force a database refresh by cron. My PC starts every night to do the backup with my cloud backup ...
3
votes
2answers
1k views

Including application crons

I have 5 web applications. The directory structure is similar to following: /var `- /www `- /domains `- /domain1 `- ...
1
vote
3answers
1k views

mplayer can't play audio from cron while ncmpcpp is playing simultaneously

I have set up a script, which executes an mplayer command, in order to play audio in crontab. It will be executed in a special set time, but this script can not play audio when ncmpcpp (a front-end ...
5
votes
1answer
468 views

How to run a cron job that relies on .Xauthority?

I want to take a screenshot every five minutes with 'scrot'. To do this over a SSH connection, I can either run ssh -X user@server while true; do scrot -z; sleep 300; done OR (after manually check ...
2
votes
1answer
2k views

Trouble with bash and crontab [duplicate]

Possible Duplicate: Reasons why crontab does not work I'm migrating some scripts from an older machine to a lucid ec2 machine. I'm sourcing a file in our ~/.bashrc and setting some ...
4
votes
2answers
215 views

Is it bad to have a long list in my crontab?

I'm toying around with building an application to display messages on the screen on a desired intervals. I want to use cron to achieve that and I am considering my options. The most naive approach ...
1
vote
1answer
166 views

Who is owner of incrond file products?

Consider this command: sudo incrontab ~/incron-config where ~/incron-config contains: /home/zetah/Documents/incoming IN_CREATE,IN_MOVED_TO /home/zetah/scripts/do_something.sh $@/$# and ...
9
votes
4answers
7k views

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

How to control output from crontab?

I am trying to run a test case via automation testing (sahi) , so I am running it repeatedly after 1 hour (via crontab). What I want is that whenever my test case fails i should receive the email ...
15
votes
1answer
13k views

Add lines to cron from script

Is there a way to add lines to a user's cron via script? I usually do it using crontab -e, but I would like to automate this task with a shell script.
0
votes
1answer
1k views

Can't launch gnome-terminal from anacron job

A few releases ago (lucid lynx) I wrote a backup shell script task that was executed as an anacron job every week. It worked fine then. However, It fails in natty. The idea was simple. The script ...
208
votes
4answers
400k views

Where is the cron / crontab log?

I want to verify if my cron job is executing and what time. I believe there is a log for my sudo crontab -e jobs, but where? I searched google and it I found references to look in /var/log ...
0
votes
2answers
6k views

Crontab not running [duplicate]

Possible Duplicate: Reasons why crontab does not work I have setup a crontab to run a shell script every minute. Here's my crontab file: * * * * * sh /var/www/stuff/public_html/recycle.sh ...
20
votes
5answers
17k views

Changing default crontab editor

I am trying to change the default editor from nano to vim. I have run the following commands: sudo update-alternatives --config editor and update-alternatives --config editor Both now output: ...
10
votes
3answers
7k views

Can symlinks be used in /etc/cron.d/?

I'm trying to implement a configuration mechanism that allows in a certain project to deploy through svn a cron configuration. I immediately thougt that what I should do is cerate symlinks from ...
16
votes
6answers
38k views

How do you set the timezone for crontab?

I have set up ACPI wakeup so my laptop wakes up at a certain time each morning. The timezone for this is UTC. I want to set up my crontabs also using UTC so they fit with the wakeup alarm. How do ...
2
votes
3answers
4k views

Trying to stop a service with cron

On my Ubuntu 11.04 server when I try to run service powernap stop as a cron job with the root user, it fails and gives me this message in syslog NAS CRON[10853]: (CRON) error (grandchild #10854 ...
1
vote
3answers
214 views

Configure a cron job to run only if laptop is plugged in?

I'm setting up a cron job to update my nmzmail database periodically, but I'd like the cron job to execute only if my laptop is plugged in. Is there a way to do this? If there's not a built in cron ...
1
vote
2answers
430 views

Why doesn't cron complete my script?

I have a backup script (rsync via ssh) which is run by cron (configured in /etc/crontab) 0 2 * * * root /bin/bash --login /opt/aebackup/sshbackup.sh If I run it as logged in root like ...
2
votes
2answers
9k views

“command not found” when running a script via cron

I want to run my script in crontab, but I have some problems... In my script I run this command: db2 connect to myDB2 This works fine when I run this as db2inst1 user, but when I run this script ...
2
votes
1answer
2k views

Why would logwatch (with cron) on stop e-mailing me daily reports?

I have logwatch configured with cron to e-mail me a daily report from my ubuntu server. Occasionally, something happens like the power goes out (which is what just happened actually) or the system ...
2
votes
2answers
6k views

How to use wget with GET parameter, or redirect web?

sorry,.. I'm noob in Ubuntu ... and I'm trying to make a robots for downloading file.. i can download the zip file via web browser's address bar like this ...
4
votes
2answers
672 views

Anacron mailing weird errors

Since update to 11.04, I keep receiving messages from 'Anacron', with some errors. Two types of messages, actually. The first of those types is like: /etc/cron.daily/logrotate: ...
1
vote
2answers
2k views

Issues with Java's JDBC (MySQL) for linux - Crontab job causes connection failure in java program, but when run manually is fine

So as the title states, Ive got an issue with Crontab and my Java program connecting to a remote MySQL database. The program itself is quite simple: it connects to the database, grabs two tables ...
2
votes
1answer
2k views

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 ...
5
votes
1answer
2k views

“CRON: Module is unknown” after upgrading to 10.04

I just upgraded our server to Ubuntu 10.04 and cron just stopped working. I tried to restart the server, restart cron but nothing worked for me. It just reports in /var/log/syslog: May 12 16:32:01 ...
2
votes
2answers
351 views

Is it possible to schedule the downloads required to upgrade?

I'd like to upgrade from 10.10 to 11.04 but my ISP has a data-cap, limiting the amount I can download. Thankfully, traffic between 2am and 8am doesn't count towards this cap, but I'm seldom awake at ...
1
vote
2answers
348 views

How to automate the following task?

Daily i wanna copy some files from a remote system and i have to put all those files in on a folder on that date say .Is it possible to automate this task? What we do presently is we log on to the ...
1
vote
1answer
1k views

Cannot get new job to run using /etc/crontab and /etc/cron.daily

I want to run a script on a daily basis, and figured that I'd use the same setup that the other cron jobs are configured on this server - by placing the script in the /etc/cron.daily folder. However, ...
1
vote
3answers
5k views

SFTP upload script, there is no key

I need to upload a file to a server. The server uploads using SFTP. After authentication, any command execution is forbidden, so I cannot SSH directly in, I need to get directly into the SFTP ...
17
votes
3answers
28k views

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?
1
vote
1answer
508 views

Where is my cronlog? [duplicate]

Possible Duplicate: Where is the cron / crontab log? While trying to Google this a lot of sources claims there's a cron log in /var/log but I have none. I'm fairly convinced cron has run ...
1
vote
2answers
170 views

How do I set time for use on a server where microseconds are important?

Lets say you have a server that stores records, and the time stamp that goes into the mysql/postgres/text-file/whatever is vital to be accurate (lets pretend it's a physics experiment, or bank ...
4
votes
1answer
1k views

Is there a programmable way to tell if the screen is locked?

I have lots of stuff in my crontab, including some that talks to my screen. If I'm not there for it to be notifying, I don't really want it to run. Is there a way I can check to see if the computer ...
1
vote
1answer
287 views

Schedule a theme change using cron

I am trying to figure out how to automatically switch to the Equinox Evolution Dawn, Light, Dusk, and midnight theme at the appropriate time of day (ie; at 6 a.m. it would switch from midnight to ...
3
votes
1answer
2k views

Where is Anacron mailing job output?

I have a job that is run by anacron. In the syslog I see messages like: Apr 6 06:11:09 host anacron[1031]: Job `myJob' terminated (mailing output) but I never see that mail. If I run that same job ...
2
votes
1answer
2k views

Cron user root or www-data?

I'm running a website on 10.04 and am not sure how to set up my crontab. Should I create it under root or a user such as www-data? Python, Postgres, Nginx.
2
votes
1answer
148 views

gpilot-install-file in a cron job?

I have a cron job that generates some .pdb files, and I'd like to automatically queue them for installation at the next sync. Unfortunately, I haven't been able to get gpilot-install-file to work in a ...
10
votes
2answers
960 views

How to schedule time-of-day upgrades

I'm responsible for about 30 Ubuntu computers at a private K-8 school. We have only a 3Mbps internet connection serving the entire campus, and I would like to ensure that updates are done in the ...
6
votes
1answer
2k views

Schedule sending mail of a log file content

I have postfix mail agent installed and I've configured gmail relay and I could send mails from the terminal as below: root@statino1:~# mail -s "subject_here" my_gmail_id@gmail.com CC: <hit enter ...
5
votes
4answers
9k views

Setup CRON weekly backup

I want to make a backup of my /var/lib/mysql and /var/www folders and save them as tar.gz files to my mounted network file server (uslons001). Here is my bash file located in: ...
0
votes
1answer
159 views

How to schedule an update?

I want to schedule my machine to run all my updates unattended at night, but this requires my authentication (which pretty much axes the unattended part). Would it be best to use a cron job or is ...
1
vote
1answer
352 views

How to download Ubuntu Server backups automatically?

I'm thinking of an investment in a new root server running ubuntu. Due to the fact, that the provider won't have extra backup-space, I need an other solution. Is it possible to download the server ...
1
vote
1answer
90 views

Can I push data from web to my Ubuntu?

I am trying to do something which involves pushing data to my Ubuntu 10.10 desktop from web (PHP) and somehow I can catch that data. Just like Push emails. Thoughts? Ideas? I know I can setup a cron ...
1
vote
1answer
1k views

Why is this rkhunter script sending empty emails?

I have started running rkhunter (a security monitoring tool) and I have finally managed to clear all of its warnings. Now, a cron job runs every day to monitor my machine. Rather than send me an ...
0
votes
2answers
938 views

How to automatically visit a website in the background after Ubuntu booted?

I wanted to know how to automatically visit a website in the background when Ubuntu loads. As far as I know w3m is for visiting web site from the console. That is why I am writing following command in ...
4
votes
1answer
420 views

Accidentally Uninstalled ubuntu-desktop and Anacron. Reinstalled. What Can I Expect?

Unfortunately when I installed the fcron package to take a look at it, I didn't realize that I was also uninstalling Ubuntu Desktop and Anacron. So, I then did apt-get install anacron ubuntu-desktop, ...
4
votes
1answer
747 views

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 ...
1
vote
1answer
508 views

How to make a python script run in Anacron

I have a python script that I would like to run daily using anacron, but I haven't been able to get it to work. The script is in my home directory, and I have put a symlink to it in /etc/cron.daily/. ...
1
vote
2answers
482 views

Does gnome-schedule run things on startup if the run time is missed?

I have a script that I would like to run daily. I set it up in gnome-schedule to run every day at 00:00, and I'm wondering whether it will run on startup if my computer was not turned on at 00:00. If ...