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
2answers
213 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?
2
votes
1answer
167 views

Script not working through Cron - JDK version mismatch between shell and script

I am executing a script through cron using the below command: */10 * * * * cd /nas/app/someFolder/psox; ./RunPSOX.sh >> /tmp/trial.log 2>&1 This is being executed by root user. All ...
2
votes
3answers
1k views

What is the easiest, most effective backup system for Ubuntu Servers?

I'm trying to backup my /var/www/ folder, MySQL, and any other special documents like in the /etc/apache2/ folder. Does anyone have any solutions for backup software? Maybe something that's ...
1
vote
1answer
985 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
414 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>> ...
4
votes
3answers
2k views

cron jobs not running

I've got a couple of scripts that I've had scheduled to run in cron for a while. About a week or so ago, they stopped running as far as the (very basic) logging showed, and also I noticed that my ...
3
votes
0answers
182 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 ...
0
votes
1answer
107 views

Crontab file is garbled! HELP!

I accidentally deleted my .bashrc file in Ubuntu 11.10. I think I restored it but I have two major issues now: Everything that I type has a red squiggly line under it in this field and the ...
0
votes
2answers
421 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 ...
1
vote
1answer
287 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? ...
9
votes
3answers
17k views

Cron Job Not Running?

I have a crontab file that looks like this: * * * * * /home/abliskovs/update/update.sh However when I check the syslog for evidence that the job has run, there is nothing that might indicate that it ...
0
votes
1answer
620 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 ...
2
votes
3answers
4k views

TIme of execution of daily anacron job

I have set a daily anacron job, which runs form /etc/cron.daily. From the /etc/crontab I see it should run daily at 06:25 (or at start-up/reboot). However when the date changes (00:00) and the ...
3
votes
2answers
591 views

Where can I find a PPA for fcron?

According to https://launchpad.net/ubuntu/oneiric/+package/fcron it seems that there is a version of fcron available for 11.10, but reffering to http://www.ubuntuupdates.org/packages/show/329892 it ...
0
votes
1answer
170 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
717 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 ...
6
votes
2answers
3k views

How to run a script only once per day with cron without specifying execution time

I wan to run a backup script once per day but i dont want to specify a certain time, just once per day. I've read that the @daily cron attribute runs every day at 00:00 but i don't know if the ...
0
votes
1answer
225 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
1
vote
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 ...
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.
0
votes
3answers
734 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
2k 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
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 ...
3
votes
4answers
21k views

Verify if crontab works

I want to verify if a certain crontab works properly. I have added a job like this: */2 * * * * /path_to_my_php_script/info.php >/dev/null 2>&1 I know that i redirect to the null ...
1
vote
2answers
7k 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, ...
1
vote
1answer
746 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 ...
10
votes
3answers
19k 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
221 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 ...
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
2answers
301 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 ...
1
vote
1answer
861 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)" ...
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.
6
votes
2answers
6k views

What is my crontab -e local file path? I want to set it via BASH script

In my Ubuntu, my username is "meuser". When i do crontab -e, i can setup my rules. But instead of doing it with crontab -e, how can i do it directly to a file? Which file i cant modify?
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
2k 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
690 views

setting editor for crontab -e , why always using basic vim?

When issuing crontab -e as root , i always got messages like the following (partial) , however , executing vim directly doesn't have problems at all. $EDITOR was set to vim in /root/.bash_profile ...
1
vote
1answer
233 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
980 views

Including application crons

I have 5 web applications. The directory structure is similar to following: /var `- /www `- /domains `- /domain1 `- ...
1
vote
3answers
817 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
400 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
210 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
155 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 ...
7
votes
4answers
5k 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 ...
12
votes
1answer
8k 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
987 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 ...