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)

8
votes
4answers
41k 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
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, ...
1
vote
1answer
999 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 ...
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
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 ...
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
378 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
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)" ...
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.
6
votes
2answers
8k 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
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
814 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
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 ...
3
votes
2answers
1k views

Including application crons

I have 5 web applications. The directory structure is similar to following: /var `- /www `- /domains `- /domain1 `- ...
1
vote
3answers
1k 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
482 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
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
167 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 ...
9
votes
4answers
7k 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 ...
16
votes
1answer
13k 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
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 ...
219
votes
4answers
417k views

Where is the cron / crontab log?

I want to verify if my cron job is executing and what time. I believe there is a log for my sudo crontab -e jobs, but where? I searched google and it I found references to look in /var/log ...
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 ...
20
votes
5answers
18k views

Changing default crontab editor

I am trying to change the default editor from nano to vim. I have run the following commands: sudo update-alternatives --config editor and update-alternatives --config editor Both now output: ...
12
votes
3answers
8k views

Can symlinks be used in /etc/cron.d/?

I'm trying to implement a configuration mechanism that allows in a certain project to deploy through svn a cron configuration. I immediately thougt that what I should do is cerate symlinks from ...
16
votes
6answers
39k views

How do you set the timezone for crontab?

I have set up ACPI wakeup so my laptop wakes up at a certain time each morning. The timezone for this is UTC. I want to set up my crontabs also using UTC so they fit with the wakeup alarm. How do ...
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 ...
1
vote
3answers
216 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
435 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
2answers
9k views

“command not found” when running a script via cron

I want to run my script in crontab, but I have some problems... In my script I run this command: db2 connect to myDB2 This works fine when I run this as db2inst1 user, but when I run this script ...
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 ...
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 ...
4
votes
2answers
675 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
2k 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
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 ...
2
votes
2answers
354 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
349 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
5k 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 ...
17
votes
3answers
29k 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
520 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
170 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 ...
4
votes
1answer
1k 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
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 ...