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
4k views

Run Java application as Cron job

I've tried everything I can think and searched high and low for solutions of but I can't get JAVA_HOME into cron to run anything java periodically. In terminal java -version gives me everything ...
0
votes
1answer
4k views

Cron not running scripts

I have looked for several reasons that could cause my problem without luck. The issue seems to be extremely particular: my server running LTS 10.04 is not correctly running scripts relating to ...
0
votes
1answer
127 views

Is there a way to schedule aptd to check for updates only at certain times?

On Ubuntu 12.04 I've noticed that aptd sometimes uses 100% of a CPU and tends to slow down my whole laptop. I wasn't installing any packages so I'm assuming that this is the automatic update check. ...
5
votes
1answer
479 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 ...
1
vote
0answers
581 views

Is wake up from standby possible via script or schedule? [duplicate]

Is it possible to cause Ubuntu to resume from standby or sleep mode to run a scheduled task like at job/crontab? (hibernation seems to be ruled out in another question) Can a script be written that: ...
2
votes
1answer
1k views

How to check when was the last time anacron successfully run?

How can I check when was the last time anacron completed all the daily/weekly/monthly jobs? I understand that the timestamps at /var/spool/anacron are the times anacron started, but it can be that the ...
4
votes
1answer
1k views

run .profile function as cron job

In the .profile file of the root user I have defined a function, e.g. function printDate() { date } I want to run this function every minute and append the output to cron.log. I tried adding the ...
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 ...
0
votes
3answers
1k views

Crontab -e gives me error messages

I get a bunch of error messages when I run crontab -e Here are the error messages. And here is my crontab file under `/usr/bin/': # /etc/crontab: system-wide crontab # Unlike any other crontab you ...
5
votes
1answer
710 views

What is the easiest way to set up a cron job?

Every time I set up a cron job there is something wrong with it and I spend a lot of time trouble shooting it. I use Ubuntu and I would like to know what tools exist to make my life easier when ...
1
vote
1answer
331 views

Scheduled tasks won't start

I am quite new to the world of Ubuntu (11.04 is my version), so please bear with me if I do not give all the necessary details to help you help me. I constantly record radio streaming on the Internet ...
2
votes
2answers
2k views

crontab command not run

I'm trying to get execute a cron job everyday at noon but i can't get it to run. To test it i even tried something like a simple create command but it never runs, it seems as if the file isn't even ...
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
516 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
242 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
469 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
208 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
347 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
452 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
873 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
181 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
834 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
241 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
972 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
995 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
10k 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
31k 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
995 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
377 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
674 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
597 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
2k 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 ...