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)

0
votes
2answers
538 views

Cron job fails for any time other than default * * * * *

On Ubuntu 11.10 (Oneiric Ocelot), my cron job run fine if I use the default * * * * * But if I want it to run at 17 hrs or any other time, it never runs. My settings are: 00 17 * * * wget ...
1
vote
1answer
1k views

In what order do cron jobs with the same schedule run?

Let's say that I have the following cron jobs: * * * * * /path/to/taskB * * * * * /path/to/taskC * * * * * /path/to/taskA Is there any guarantee to the order in which they will be run? I've seen ...
1
vote
1answer
1k views

How can I prevent two shell scripts running at the same time?

I have a tar backup script that runs once a month. It runs at night through cron. I also have a power schedule that reboots the server at 4.15 every night. The problem is that the server reboots ...
1
vote
2answers
1k views

How to get updated IP address mailed to me in DNSExit?

I'm using DNSExit on my Ubuntu server (Natty 11.04) and have installed the ipUpdate rpm file and did an apt-get install for chkconfig to enable the ipUpdate. I'd like to get an email whenever the IP ...
8
votes
4answers
4k views

Generic solution to prevent a long cron job from running in parallel?

I am looking for a simple and generic solution that would allow you to execute any script or application in crontab and prevent it from running twice. The solution should be independent on the ...
3
votes
4answers
1k views

Cron not able to succesfully change background

I'm running 12.04 with a custom XML background (modification on Day of Ubuntu) that changes based on time of day. I've noticed that there's a significant delay between when the changes are scheduled ...
-1
votes
2answers
18k views

Crontab not working

I know that this was asked several times, but I don't know what to do... I've tried all the solutions proposed on AskUbuntu, but with no results... So... I have this shell script in my home ...
2
votes
1answer
712 views

Cron job not executing?

I'm trying to execute a PHP script every two minutes on my server, but it doesn't seem to be working. I'm using the following cron job: 2 * * * * /usr/bin/php ...
1
vote
2answers
4k views

Mutt runng from Crontab

I have a bash script that is sending an email through command line mutt. This bash script is being called from a cron job (setup using crontab -e because of permissions needed to do all items in the ...
3
votes
2answers
609 views

Taking timely screenshots of particular sites

I have a website where I have to take weekly screen shots of sister sites. I was wondering how this maybe done. I had obtained the code for taking screen shots but have no idea how to open up the ...
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
124 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. ...
1
vote
0answers
578 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 ...
3
votes
1answer
810 views

Run /etc/cron.daily/apt at a specific time (i.e. without anacron)

I want to setup a cron job to download up-to-date package only at night. But I found that the cron.daily jobs will be run by anacron if it's installed, so if my computer fails to wake-up at night to ...
3
votes
1answer
273 views

Good workflow for updating R modules around R-cran updates?

I like that R updates frequently to give me the best new packages, but it does seem to pose a problem for my R scripts on cron schedules. I noticed that every time ubuntu updater updates my r-base ...
0
votes
1answer
217 views

Why does mplayer freeze when running from Scheduled Tasks?

I've been trying to use Scheduled Tasks and mplayer as an alarm clock, scheduling mplayer /path/to/file.mp3 for my morning wakeup time, but whenever it reaches the scheduled time, mplayer freezes only ...
3
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 ...
10
votes
2answers
51k views

Script doesn't run via crontab but works fine standalone

I have a script that reminds me to restart my computer if uptime is more than, say 3 days (although its set to 0 days now just to check if the script is running as my computer has been up only over a ...
0
votes
3answers
876 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 ...
4
votes
3answers
258 views

Do I have to set up mail for Ubuntu to be able to mail users?

I remember Debian automatically sending mail to users (to report a failed sudo authentication attempt, for example). On Ubuntu is mail of some kind automatically set up? I created a cron job, and ...
5
votes
1answer
703 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 ...
5
votes
3answers
10k views

Daily cron job not running

A quick overview: I have a script that will daily backup my source code repository from SVN into a tarball for that day. I have tested the script and it works very well as long as I run it as sudo, ...
1
vote
1answer
320 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 ...
3
votes
2answers
1k views

Why is git not using my pubkey with crontab?

To backup my sql database I have a cron job running that makes a mysql dump. Now I want to create another cron job that commits this dump to the repo, the problem now is that it doesn't work. In the ...
2
votes
2answers
1k 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 ...
1
vote
1answer
55 views

at job facility for anacron?

Is there a tool for Ubuntu to schedule jobs similar to at but for anacron instead if plain cron? Eg. echo "rm -Rf /tmp/workdata.$$.*" | at now + 99 minutes It doesn't have to be via anacron, just ...
1
vote
1answer
435 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
385 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 ...
5
votes
2answers
1k views

NMCLI works in script when I run itdirectly , but not when run in CRON

This is under Ubuntu 11.10 I have a script that starts a PPTP VPN connection fetches a couple of files, then closes the connection. When I run this script from a terminal prompt it works perfectly; ...
1
vote
2answers
224 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
173 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
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
430 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
193 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
109 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
430 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
303 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
19k 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
668 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
606 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
175 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
744 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
228 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