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
2answers
615 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
1k 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
1k 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
298 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
303 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
4k 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 ...
13
votes
2answers
17k 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
367 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
158 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 ...
3
votes
1answer
692 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
273 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
1k 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 ...
1
vote
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
146 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
753 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 ...
5
votes
1answer
1k 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
6k 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
146 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
312 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
88 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
857 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
393 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
597 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
406 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
392 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 ...
1
vote
2answers
1k views

How to interpret this crontab command?

I know that if I wrote in crontab -e following command 01 04 * * * somecommand then it will run somecommand at 4:01am on every day of every month. What happens if I wrote * * * * * somecommand? ...
2
votes
4answers
4k views

execute script after desktop loaded?

I want to execute bash script on startup that opens several terminals in different workspaces. Script works just fine if I call it from terminal, but it doesn't work if executed from crontab using ...
2
votes
3answers
533 views

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

How to move files over samba share with gnomevfs cli

Ok I am in the process of backing up my film collection to a NAS and I wanted to automate this as much as possible as I have to work at the same time. I am trying to setup a daily dump of ISO's ready ...
2
votes
2answers
3k views

Problem with crontab, script runs when executed from command

this is my cron entry: */5 * * * * /home/user/scripts/backupDB.sh && echo "Backup Successful: $(date)" >> /home/user/tmp/mybackup.log This is the script that is called: #!/bin/sh ...
6
votes
4answers
8k views

Why does apt-get fail when automated with cron?

I'm trying to use cron to automate my system updates. You can see my crontab, commands, and resulting errors below. When I run upgrades.sh as root, the script runs fine. When cron runs it, apt-get -y ...
2
votes
2answers
2k views

cron.daily seems to run but doesn't log any activity

We have a number of scripts setup to run in the /etc/cron.daily directory - some of them show evidence of being run at about the right time (files are archived/compressed and truncated), but others ...
120
votes
32answers
163k views

Reasons why crontab does not work [closed]

Many a time and oft, crontab scripts are not executed as expected. There are numerous reasons for that, for example: wrong crontab notation, permissions, environment variables and many more. This ...
0
votes
1answer
2k views

What is proper setup for “anacron”?

I am running Ubuntu 9.10 and 10.04 on MediaTemple (ve) servers. On both of them, the anacron setup is broken, ... and they have been broken since I first installed Ubuntu. It has only come to my ...
3
votes
2answers
3k views

Is there a way to suspend/sleep via bash?

I have to get nine 46" LCD monitors (running Windows) to suspend/sleep at 8pm and wake at 8am every morning. It's been a bit of a mess trying to get the commands working, including the privileges. ...
7
votes
3answers
3k views

“Backup Intervals” in rsnapshot.conf?

A simple question about rsnapshot. In order to perform daily backups I'm going to add lines to cron in my Ubuntu. Then, why do I have also these lines in the rsnapshot.conf ? ...
3
votes
2answers
2k views

Cron scheduling: Is the hour argument in 24h format?

In order to run cron in the night at 4 o'clock I need to write 4 * * * *? And to run at 16.00 o'clock, it should be 16 * * * *? thanks
2
votes
1answer
2k views

How to automate mysql backups?

I want to automatize the backup of my databases and files with cron. Should I add the following lines to crontab ? mysqldump -u root -pPASSWORD database_name | gzip > /home/backup/database_`date ...
3
votes
4answers
4k views

Cron jobs show up in GNOME Scheduler but don't execute

I have configured Back In Time and MySQL Administrator to make a backup every day at 15:00. In order to be sure I have installed Gnome Scheduler to see whether these two applications are registered ...
5
votes
2answers
1k views

How can I create a cron command that will execute a command inside a detached screen?

I have created a screen, but can I now somehow execute a command that will run commands in the detached screen? I do not even know if this is possible, but if it is, it will probably be something ...
3
votes
1answer
806 views

How to use crontab, .netrc, and git push?

I am in the process of automating the backups from various servers to a central point then pushing those config changes into a git repo so I can track any changes over time. The rest of the scripts ...
0
votes
4answers
417 views

How can I set up Ubuntu to install updates without asking? [duplicate]

Possible Duplicate: How do I enable automatic updates? I would like to have Ubuntu silently install updates every day or so. It it possible to set it to do so? Are there any potential ...
3
votes
1answer
1k views

CRON is changing encoding?

I have a legacy Java program that outputs an SQL script. I then use Apache Derby to run that SQL on the target database (which is not on the same server as CRON). When run via putty, this works fine. ...
2
votes
1answer
683 views

Cron mail notification

I would like to disable crontab mail notification for one of my task... I run this task every minute, that means 1440 mail per day :S Can someone tell me if this is possible and how can I do this?
9
votes
4answers
10k views

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?
7
votes
3answers
10k views

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 ...
2
votes
2answers
960 views

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?