Cron is a job scheduler that allows users to run commands periodically.

learn more… | top users | synonyms (1)

1
vote
1answer
359 views

vixie-cron.x86_64 doesn't seem to execute jobs on crontab

I have installed crontab on CentOS 5.6 x64 via yum install vixie-cron.x86_64 Here is my crontab -e SHELL=/bin/sh 0 0 * * * cat /root/mysql-backup.txt | xargs ...
7
votes
2answers
4k views

Can I automate tar's multi-volume-feature?

Ok, so I've just had a read through this page after a way to improve my current backup solution on my Debian server. Tar seems to be offering a quite nice multi-volume feature, although when I try it ...
3
votes
2answers
1k views

How to start the cron daemon

I am using RHEL 5.4 I killed the cron daemon accidentally. I wanted to stop a cron task, didn't know how to do it, ended up killing the cron daemon itself. How do I start it again?
3
votes
3answers
12k views

How do I add an entry to my crontab?

I am using crontab for the first time. Want to write a few very simple test cron tasks, and run them. $crontab * * * * * echo "Hi" doesn't produce anything. crontab */1 * * * * echo "hi" says ...
4
votes
2answers
3k views

How to run a cronjob in my regular environment?

Both the shell and environment variables that cronjobs are run in is completely different from the ones presented to me in gnome-terminal. How can I run a cronjob under the same circumstances as if I ...
2
votes
1answer
148 views

Need to find a cronjob

I have a problem, some user ,and I'm not sure who, on one of my servers wrote a cronjob that executes every night at midnight. The cronjob creates a sql dump of a database which is then grabbed by ...
0
votes
1answer
196 views

Is there a way to combine a file with crontab?

I'm trying to create an interface that will show a message on the screen every set time. Cron is an ideal tool for this case only it doesn't read data from a file during it's run (as far as I could ...
5
votes
5answers
2k views

How can I use cron to display messages on the screen via notify-send

I am toying around with notify-send and cron (on an Arch machine) and I can't figure out a way to combine them: I tried the solution given here and here, but neither worked. How can I use them? ...
3
votes
3answers
919 views

Is crontab multithread?

I don't know where I can find more information about crontab, so I ask here. Crontab is it multithread? How does it work?
2
votes
1answer
3k views

Cron job not executing

I'm trying to use cron for the first time, and I'm stuck. I'm using Ubuntu 10.10, and the following is my /etc/crontab file. The only modification that I've made is appending the last line. I've ...
4
votes
1answer
757 views

How to use cron + python to regularly adjust screen brightness?

I want to use cron and this script (http://askubuntu.com/questions/23593/use-webcam-to-sense-lighting-condition-and-adjust-screen-brightness): import opencv import opencv.highgui import time import ...
3
votes
1answer
584 views

Scheduled task on reboot

How can I schedule a task to run on next reboot? I understand that we have tools like cron and at to help with scheduling. But they seem to allow scheduling at a specific time and not on specific ...
0
votes
3answers
771 views

How to use gnome-session-save from cron?

I am trying to issue the gnome-session-save --kill command via crontab. I used the command sudo crontab -e. In the file is this: PATH=/usr/bin 00 00 * * * gnome-session-save --kill The command does ...
2
votes
1answer
282 views

Cron & Gnu Screen - Trouble with detached screen [duplicate]

Possible Duplicate: sending text input to a detached screen I have a script for my Minecraft server that runs automatically every 15 minutes. The problem is that after a server reboot, ...
5
votes
2answers
1k views

Open emacs in a terminal when editing crontab

I have setup emacs as my default editor in /etc/profile. When I want to use emacs in a terminal. I open it with the -nw option. How can I have the same behavior when doing a crontab -e preventing it ...
2
votes
1answer
628 views

Check for process already running in webfaction?

I use Django framework on webfaction and have 5 different cron jobs. One of them lasts much longer than others and sometimes gets stuck (30-120 seconds or more). I have already set that cron job to ...
10
votes
6answers
2k views

CronJob every 25 minutes

I want to know whether there is any easier way to run a job every 25 minutes. In cronjob, if you specify the minute parameter as */25, it'll run only on 25th and 50th minute of every hour
3
votes
3answers
4k views

linux cron: want to backup a folder

Hello I would like to backup a folder using cron on a centos. The folder c2duo_mms is located in /usr/local/src/djcode/c2duo_mms. I would like it backed ip every 1:00pm on Tuedays to my home folder ...
9
votes
2answers
1k views

How can I delete all files in a folder that haven't been accessed in a certain amount of time?

I'd like to run a nightly cron job that deletes all the files in a folder that haven't been accessed in a week or more. What is the most efficient way to do this in bash?
15
votes
2answers
9k views

How can I tell cron to run a command every other day (odd/even)

When configuring cron to run a command every other day using the "Day of Month" field, like so: 1 22 */2 * * COMMAND it runs every time the day of month is odd: 1,3,5,7,9 and so on. How can I ...
4
votes
1answer
505 views

How can i dump /tmp/files in CentOS to Dropbox using crontab?

How can i dump files from my CentOS box to Dropbox account? As regular nightly backup task.
4
votes
3answers
6k views

Can I use logrotate to compress daily (date named) logs?

I have logs in the following format: YYYYMMDD I want to compress old logs (older then current day) and maybe move them to a different directory afterwards. Can I do this in logrotate, or do I have ...
2
votes
1answer
239 views

Can I bypass crontab command by putting the file?

I need to create and put my cron file with cat cronfile1 cronfile2 > cronfile crontab cronfile -u myuser This works for me, but I want to know if I can do directly cat cronfile1 cronfile2 > ...
2
votes
2answers
2k views

stop parallel processing for a cron triggered process

I have configured my webservers cron jobs to trigger some php script, every 15min, but sometimes the script takes morethan 15 min to complete execution, by the time another process of the same script ...
1
vote
1answer
154 views

How to list the actual cronjobs?

If I (e.g.: under Fedora) edit the crontab file with vim, then I restart crond: /etc/init.d/crond restart then the actual crontab file: "/etc/crontab" is the same as the actual cronjobs in reality. ...
5
votes
3answers
6k views

How to add unique id to file name in cron job?

My cronjob looks like this: 5 3 * * * mysqldump -u root test > /srv/backup/mysql_daily.dump How can I make filename unique for every time when cronjob writes mysql_daily.dump?
3
votes
1answer
3k views

cron not executing?

I have the following cron tab installed: crontab -l # m h dom mon dow command */10 * * * * "echo" >> /tmp/cron.log The server is at rackspace, it's a cloud server: Linux myserver #8 SMP ...
9
votes
1answer
9k views

Cron log on debian systems

On Redhat systems cron logs into /var/log/cron file. What is the equivalent of that file on Debian systems?
2
votes
1answer
2k views

Cron daemon error : Permission Denied

I am having trouble setting up a cron job. My set up is as follows: crontab -e */10 * * * * OTP_ProJect/PandaServerInfo/SVN/PandaQueueMonitoring/trunk/submit_cron_test.sh the shell script has ...
7
votes
3answers
12k views

Cron running job every 15 seconds

Could you advise me what to write in crontab so that it runs some job (for testing I will use /usr/bin/chromium-browser) every 15 seconds?
1
vote
1answer
1k views

Cron: My crontabs don't seem to be doing anything at all

I think I'm missing something. I've set up some crontabs to handle rsyncs over ssh in my office to handle some backups, but they don't seem to be running OR logging, for that matter. Am I missing ...
3
votes
2answers
2k views

Configuring cron.hourly

I am unable to configure a cron job to run by placing it in /etc/cron.hourly folder. SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts ...
1
vote
3answers
508 views

Why does Crontab give me an error with my PHP script when running it from the terminal does not?

I'm having some problems with running the Crontab with PHP files. I have this same php scripts running in the Crontab for more than 6 months but some days ago mysteriously they stopped to execute the ...
2
votes
1answer
1k views

Are changes in crontab applied when the file is saved, or when the editor is closed?

When I do crontab -e, are the changes applied immediately when I save the file, or do I have to exit vim for it to be applied?
15
votes
6answers
37k views

Why did my crontab not trigger?

I used crontab -e to add the following line to my crontab: * * * * * echo hi >> /home/myusername/test Yet, I don't see that the test file is written to. Is this a permission problem, or is ...
2
votes
3answers
252 views

Crontab syntax: using '*' for minutes value

What happens if I use '*' for the minutes value? Is the command going to be run every minute? For example: * 4 * * 0 <command>
6
votes
2answers
5k views

Not able to ssh in to remote machine using shell script in Crontab

Below is the script which i am trying to run, which runs without any issue for i in `seq 200 2100` do usr=(`ssh -t -t -o ConnectTimeout=60 machine$1 finger | tail -1 | awk '{print$1}'`) echo ...
11
votes
5answers
22k views

Using the system date / time in a Cron Script

I'm setting up a Cronjob that will backup a MySQL database I have in my server, but I don't want it to keep overwriting the same file over and over again. Instead, I want to have an array of backups ...
8
votes
2answers
7k views

Bash Script on Startup? (Linux)

Is there any way to make/run a bash script on reboot (like in Debian/Ubuntu for instance, since thats what my 2 boxes at home have) Also, any recommended guides for doing cron jobs? I'm completely ...
14
votes
2answers
48k views

How can get a list of all scheduled cron jobs on my machine?

My sysadmin has set up a bunch of cron jobs on my machine. I'd like to know exactly what is scheduled for what time. How can I get that list?
3
votes
4answers
6k views

executing a sh script from the cron

I have a test.sh script #!/bin/sh php /home/v/file.php sh /root/x/some.sh when I execute the file as root from command line it works. sh /home/v/test.sh when I set it to crontab -e (is the root ...
1
vote
3answers
356 views

Cron with a 12-hour issue?

I have a cron job that's managed through plesk. I'm being told that it's being executed twice in a day, once at 5AM and once at 5PM, based on the email that's being received. Here's the cron line: ...
1
vote
2answers
812 views

using cron to run script

Hey guys, im trying to run a script using cron, im using a crontab created by the user ashtanga, in the crontab i have */5 * * * * /home/custom-django-projects/SiteMonitor/sender.py in top of the ...
3
votes
2answers
2k views

Add a one-off scheduled task through a shell script?

I'd like to execute a task at a given time, once. I know I can just use crontab -e to add it there, but I'd like to do that through a shellscript. crontab -e gives me some temporary file to edit ...
12
votes
3answers
12k views

Does RHEL execute all cronjob files under /etc/cron.d/*?

This is a RedHat Enterprise Linux 5 system (RHEL). We manage this system using Cfengine. We have several cronjobs which are running twice as often as usual. I checked the cronjobs under /etc/cron.d/ ...
2
votes
4answers
2k views

Anacron job complains “Gtk-WARNING **: cannot open display”

I'm trying to make a simple weekly Anacron job that backs up my computer if I click yes on the dialog. The script I wrote works fine if run manually, but when Anacron runs it, nothing happens and I ...
4
votes
1answer
80 views

When I schedule a command with 'at', can I change where the output is mailed to?

When I schedule a job/command with at to be executed in the future, the standard output and error of the command is "mailed" to the user that did the scheduling. So after my job runs, I get a message ...
7
votes
3answers
8k views

/etc/cron.daily/foo : Send email to a particular user instead of root?

I'm running CentOS 5.5. We have several cronjobs stored in /etc/cron.daily/ . We would like the email for some of these cronjobs to go to a particular email address, while the rest of the emails in ...
3
votes
2answers
407 views

I need help with a cronjob to watch for runaway processes and kill them

I have an interesting situation, I have a runaway ruby process - I know exactly how I trigger it. Point is, it got me thinking about runaway processes (CPU usage or memory usage). How would one ...
3
votes
1answer
3k views

How to have cron run a python script as root?

How can I get cron to run a python script as root? Here is my crontab file: 0 * * * * ./twitter/twitter.py Am I doing something wrong?