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)

2
votes
0answers
2k views

logcheck: (CRON) error (grandchild #4266 failed with exit status 127) [closed]

for my Ubuntu 10.04 LTS server, logcheck send me this log: Nov 14 08:10:01 servername CRON[4265]: (CRON) error (grandchild #4266 failed with exit status 127) Nov 14 08:10:01 servername CRON[4264]: ...
1
vote
1answer
511 views

Managing cron.*

I see that Ubuntu uses /etc/cron.{daily,weekly,monthly} for cron jobs. I also see that some things, like updatedb from mlocate, put their jobs there: $ dpkg -L mlocate|grep y/m ...
2
votes
1answer
389 views

Is it necessary to monitor cron/anacron?

I use Ubuntu at home for my personal matters, not as a "server". I shut down my computer two or three times a day and there aren't any fixed usage times. I understand that there are automated tasks ...
1
vote
2answers
239 views

How can I automate the backing up of cron jobs?

In the even of a crash I realize that I may not be backing up system and user cron jobs. How can I automate the backing up of my systems cron jobs?
1
vote
1answer
1k views

How to run gui app from cron as root?

The following works in cron: * * * * * non-root-user export DISPLAY=:0.0; zenity --info And displays a zenity dialog on non-root-user's desktop each minute. But if I do the following: * * * * ...
0
votes
1answer
461 views

Crontab Output problem

I have this script. When I run it from the command line, it works fine. When I run it from cron, it only prints out half of the data The results should look like this: 07/Feb/2012 11 0.5 ...
0
votes
1answer
3k views

how to kill a cron job if it doesn't show in ps? or get it to show in ps?

I have a cronjob set up like so: ~> crontab -l 0 * * * * /bin/bash -l -c 'cd /mnt/hgfs/kodiak && RAILS_ENV=test bundle exec rake nightly_tasks --silent 2>> ...
3
votes
0answers
205 views

Error from Ksplice cron job [closed]

I'm running Ksplice on Ubuntu 11.10 64 bit and I get the following error when the Ksplice cron job runs. $export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin && [ -x ...
1
vote
1answer
1k views

Problem with gadmin-rsync and cron(d)

I'm trying to get the Schedule for GADMIN-RSYNC working on Ubuntu 11.10. When I try to save Schedule options, I get an information window which states: Error: The time schedule server "cron(d)" ...
1
vote
1answer
341 views

Run anacron even when on battery (laptop)

There is a known behavior of anacron not to run when the laptop is running on batteries. Is there any way to stop this behavior and run anacron whatever the power state? ...
0
votes
2answers
450 views

Linux set time from net at login

On my Ubuntu 10.04 box I (a user, not root) can issue sudo net time set and it works great. I'd prefer that the box get the net time on a more regular basis, or at least each time it gets logged ...
4
votes
2answers
3k views

How to call zenity from cron script?

Example script error.sh: #! /bin/bash zenity --error --text='Something very bad has happened!' My incron-config: ~/Documents IN_MOVED_TO ~/scripts/error.sh If I run error.sh in terminal GUI ...
0
votes
1answer
852 views

How to restart anacron every hour?

What is the proper way to restart anacron? I want to set it up to restart every hour. Would a crontab entry like do the job? sudo crontab -e @hourly anacron Why is anacron initially started by ...
0
votes
1answer
180 views

“aptitude update” as cronjob, customize the cron-mail-output

I have set up aptitude update as cronjob for root and sending the mail to my normal user account. What I want to have now, is that all the output of aptitude is ommited and instead only a ...
2
votes
1answer
821 views

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 ...
0
votes
1answer
238 views

Cron Job and permissions

I have set a cron job to execute a bash script. If I change the permissions of the script to (Others: None) will it still be executed? Thanks a lot
2
votes
1answer
2k views

Does Ubuntu periodically clean empty directories under /var/run?

I've noticed that empty directories get deleted from /var/run/ on reboot. I'm wondering if that's something Ubuntu does or something that I have installed.
2
votes
1answer
3k views

Safe adding and removing cron jobs from shell script?

I need to create a package, which should add itself to list of cron jobs, and remove it from that list on deinstallation. How can I do it without possibility of screwing the crontab file? Maybe there ...
0
votes
3answers
939 views

Scripts in crontab don't get executed at all

i did something as simple as this: crontab -e * * * * * touch /home/alexis/hi.txt crontab: installing new crontab but it doesn't work at all; not mentioning more complicated scripts. any idea ...
6
votes
2answers
3k views

Keep getting mails about xdebug

I'm running Oneiric as a LAMP development server, and have xdebug installed. It works fine, but since I set up my email so that root mails are forwarded to my gmail, I keep getting the following: ...
3
votes
1answer
983 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 ...
1
vote
2answers
9k views

How to activate this crontab?

I have a setup as below but its never getting executed. $ chmod +x /var/tmp/myscript.sh $ vim /var/tmp/crontab.sh; * * * * * sleep(10); /var/tmp/myscript.sh $ crontab /var/tmp/crontab.sh Now just, ...
12
votes
3answers
30k views

How to execute command every 10 seconds (without cron)?

When I execute cron I get this fault cron: can't open or create /var/run/crond.pid: Permission denied So, how to do it without cron? P.S. I want to check if file in svn has changed and I have a ...
1
vote
1answer
980 views

Daemon or crontab?

I understood that I can create a service that would run and perform certain tasks in the background. But I actually only need to execute a task that needs to be done every 5 minutes. It needs not to ...
1
vote
1answer
239 views

mythbuntu epg cron job not working

I've got a problem with my EPG grabber script 'shepherd' for the Australian EPG. These two commands below work when I type it as user mythserver but when I put them in cron the first command creates a ...
1
vote
2answers
372 views

How do I shutdown Oracle automatically every Friday at 10pm?

You install oracle database but need to shutdown at night every Friday at 10pm so that you can make backups. How would you achieve this automatically using the crontab utility? Assume that the script ...
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: ...
2
votes
3answers
590 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 ...
5
votes
3answers
2k views

Need help with bash checking if computer uptime is greater than 5 minutes

I have an bash script that runs on a every minute cron. It checks to see if a necessary program is running and starts it if it is not. Occasionally it will run before the user has actually autologged ...
3
votes
2answers
1k views

How to create daily job without write access to /etc?

I don't have write permissions to /etc and its sub folders, but even do I would like to have bash script that is executed every morning. How to set it up? also when i type cron in command line I get ...
0
votes
2answers
1k views

How to append text to file every morning?

I would like to append current date to text file every morning at 7am. if the computer is turned off I would like it to be executed after its turned on.
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 ...
10
votes
4answers
11k 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 ...
1
vote
1answer
1k views

How to use cpulimit on ALL cron jobs?

Using Ubuntu Server an AWS micro box, so if the cpu utilization spikes AWS will virtually kill the CPU for the box (for about 30 sec). nice doesn't solve the problem, but cpulimit does (I use it in ...
0
votes
1answer
3k views

Using curl with filename containing a dynamic date

I'm trying to upload dynamically created log file from my local box to my FTP server. This all happens in a cron job (crontab) I run every night. It creates the file using: 30 00 * * * touch ...
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 ...
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 ...
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 ...
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 ...
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 ...
1
vote
3answers
213 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
429 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
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 ...
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, ...
5
votes
2answers
2k 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 ...
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 ...
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 ...
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 ...