Cron is a time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates.

learn more… | top users | synonyms (2)

1
vote
3answers
101 views

Cron - Does not execute command every 10 mins

I don't understand why cron is not really executing the command every 10 minutes. in crontab -e I have added: */10 * * * * /var/www/myproject/recording/batch.pl I could see in the cron log it is ...
2
votes
2answers
224 views

Why doesn't this command work as a cronjob, while it works perfectly when typed in a shell?

If I run this command from the shell, it works as expected: cd ~ && mysqldump --databases --skip-dump-date --host=localhost --user=admin --password=xxxxx --lock-all-tables ...
-2
votes
1answer
269 views

Stop .htaccess blocking cron jobs [closed]

I have a php script on my site that, when run, changes the 'Dog of the Day' on my home page. I have a cron job set up to run the script once a day, and everything works perfectly. I've secured my ...
0
votes
2answers
371 views

Start script.py after reboot as user xy in Debian Squeeze

How can i start a python script.py after a reboot as user xy in Debian Squeeze automatically?
5
votes
2answers
1k views

Running script in Crontab every 3 days once

I have some Perl scripts which needs to be runned every 3 days once, The following is syntax which I have entered, Can you please let me know, Is this correct or wrong. 30 19 * * */3 root ...
0
votes
1answer
296 views

Cron permissions?

I have a bash script which if I run manually (as root) performs all of its tasks without issue. The tasks are just a few php scripts and then a "mv" to move the process file to a temporary folder. ...
1
vote
2answers
99 views

Checking whether there are any cronjobs currently running

I'm running a webserver in a VM. In order to create consistent backups, I have to stop Apache, MySQL and other processes for a short time before doing a snapshot of the VM's harddrive (LVM-based). ...
0
votes
2answers
62 views

grep double quote in cron

i run this command on the terminal $ my_json_generator.rb | grep \"mtype\":164 | my_json_consumer.rb json_generator creates json objects. 1 per line. {"foo":7, "mtype":164, "bar":[1,2,3]} I ...
1
vote
0answers
469 views

Some (but not all) cron jobs stopped running. Restarting cron fixed it, but what caused it?

I'm running Ubuntu Server 10.04 with a crontab which runs every minute, with a lot of jobs in the file. Each job is a PHP script to be executed. Earlier today, it seems that some (but not all) of the ...
1
vote
2answers
614 views

shell script in crontab, not all output being logged

I've got a simple shell script that runs a few LFTP commands and processes the files. When running straight from bash I get full output of those LFTP commands on screen. When running from crontab ...
0
votes
3answers
1k views

Why is logrotate not rotating logs Tomcat access logs on aws centos 6.3?

I have the following file in /etc/logrotate.d: /usr/share/apache-tomcat/logs/*.access { nodateext copytruncate daily rotate 7 notifempty postrotate EXT=`date --date='-1 day' +%Y-%m-%d` /bin/gzip $1.1 ...
-1
votes
1answer
76 views

Working from the prompt, but not from the cron job [duplicate]

I created a script which takes the IP configuration as input ifconfig | /usr/bin/python "/home/michel/Python/sendIp.py" When i type that in in the command prompt, the script gets executed well, and ...
1
vote
1answer
167 views

Cronjob not working properly on debian

I'm trying to run a PHP script everyday at midnight, so my cron has the following entry @daily /usr/bin/php /websites/xxz/misc/wU5HaFre.php /websites/xxz/misc/wU5HaFre.php has 755 rights, so it's ...
0
votes
1answer
138 views

rdiff-backup simultaneously

into my backup Linux server (Ubuntu) I have done a system to backup my three servers. Into etc/crontab I have write line like this: 0 0 * * * user rdiff-backup -v9 user@111.111.111.111::/var/www/ ...
0
votes
3answers
137 views

What is wrong with this cron tab entry?

0,35 * * * * /home/scripts/backup.sh "daily backup" what is wrong with my cron tab line it isn't working I didn't try @daily yet but wanted to make sure it is running so am running it at 0 minutes ...
0
votes
2answers
159 views

Cron Email Locally

I have my crontab configured to mail to a specific address, for example purposes lets say "test@test.com". test.com is also the host name of my box, however I have my mx email records configured ...
0
votes
2answers
297 views

glassfish start script fails through crontab

I have a created a script to check to see if my glassfish server is running, if it isn't, it attempts to kill the java process to ensure it's not hung, and then issues the asadmin start-domain command ...
1
vote
1answer
146 views

apt-get upgrade will run on command line but not from cron bash script

Running the following commands on the command line works fine $sudo apt-get update $sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state ...
2
votes
3answers
295 views

Is it possible to assign a nice and ionice priority to all scripts executed by cron daemon?

To be a bit more concrete: I have a Debian Squeeze Linux machine with a web application that should become available all over the planet. Until now I had a bunch of resource consuming cronjobs each ...
1
vote
1answer
204 views

Reset route table periodically with cron

Am trying to do some routing on a remote Linux server, every time something goes wrong i lose connection and i have to call the IT guy there and ask him to restart the network interfaces or sometimes ...
1
vote
3answers
90 views

Crontab schedule monthly

I would like to schedule my tasks every x months on day 1 starting for example, March. I am unsure if this is the syntax I'm looking for (for repeating the job every 4 months): 0 0 1 3/4 * ...
0
votes
2answers
260 views

how to know what crontab is going to do

Somehow the stuff i wrote in the crontab is now working as i wish. To be more exactly, i think it is not executing my commands. So now i would like to know if there is a way to get a plan what ...
0
votes
1answer
40 views

How to setup server cron in specific minute

I'm editing a crontab for a job that I want to run it every hour but at specific time like at 10:15AM, 11:15AM, 12:15PM so on. I'm not sure if this is possible though. For every hour 0 * * * ...
0
votes
3answers
105 views

crons are not working, but scripts are… any idea what is it?

I checked on internet , this might be a common problem, but I dont know how to solve it, all things that they said are not my case... The cron is running, I checked, still, I have no log files (at ...
-2
votes
1answer
841 views

what is the best universal watchdog script? [closed]

OK, so I'm familiar with several methods of implementing a "watchdog" script. The problem is, that none of these check for a "hung" or unresponsive process. They all just check if the process is still ...
0
votes
1answer
289 views

Cron jobs no longer work since installing ssl cert on rackspace cloud server

I recently installed an ssl cert on my rackspace cloud server. Prior to installing it, my cron jobs were running fine. When I ssh to my server and do a crontab -l, I can see the jobs are still ...
0
votes
3answers
324 views

Several Cron at same minute

I'm installing a bunch of Magento shops on a webserver. Every website has a cron job that Magento uses to update its stuff -- it takes 3-4 seconds to complete. The instructions tell to set it to run ...
0
votes
1answer
76 views

cron job failing silently

I have a cron job scheduled to run under the root user, but it is silently failing. The command calls a php script which among other things runs mysqldump via exec, this dump is not being created. ...
0
votes
2answers
42 views

Redirect output to subfolders that don't yet exist

I currently redirect crontab script output to file in some folder that exists, like this: echo "test" > `date "+/tmp/%Y%m%d_%H%M.log"` I want to redirect output to subfolders, that maybe don't ...
0
votes
3answers
83 views

Can't figure what's wrong with with my crontab

Due to some bug in one of my scripts i'm being forced to delete temp files every 30 minutes until i'll figure it out and debug it. To get it done i've written a small bash script that i run every 30 ...
0
votes
2answers
2k views

Host key verification failed [rsync: connection unexpectedly closed]

I have been stuck with a peculiar problem, where rsync command is not running when it is executed through crontab. Below is the code : #!/bin/sh -x ...
-2
votes
1answer
304 views

Add Cron Job to Fedora Server [closed]

How do i add 2 cron for Fedora ami in AWS, where i need to run one cron twice a day and other one would be if data is added to the DB. Pleas guide me from the begging coz this cron concept and the ...
1
vote
1answer
520 views

cron does not follow bash script's instruction to send mail conditionally

I am having trouble getting cron to email an attachment based on a predefined condition set in the bash script. The following is my /etc/crontab setting: SHELL=/bin/bash ...
0
votes
6answers
3k views

Bash script runs manually, but fails on crontab

I'm a newbie to shell scripting. I have written a shell script to do incremental backup of MySQL database.The script is in executable format and runs successfully when executed manually but fails when ...
2
votes
1answer
1k views

AWS API Tools “Command Not Found” When Executing from Cron

I have created this bash script to generate a snapshot of my EBS Volume #! /usr/bin/bash ec2-create-snapshot -d "My Snapshot" vol-XXXXXXX -O <MyKey> -W <MyOtherKey> And it works when I ...
1
vote
1answer
104 views

Cron job sends out the same data every time despite changes in the database

This question is related to Gentoo Linux. I have cron job that runs every morning at 10AM. The cron job calls a bash script which in turn calls a groovy script that queries the database for a column ...
-1
votes
1answer
1k views

cron job not running on Centos 6.3

I have created a cron job that runs a script which moves files from one location to another. Here is my result after running crontab -l 0 6 * * 0 root /root/scripts/move.script.sh ...
1
vote
1answer
540 views

How to allow cron to send an email attachment?

SELinux is preventing cron from attaching a log file in the email with the following error: notice kernel [ 7148.923034] type=1400 audit(1359466501.857:5): avc: denied { read } for pid=3182 ...
0
votes
1answer
106 views

cron settings for elysia_cron (a drupal module) on a load balanced server

I am configuring elysia_cron on a Rackspace Managed Cloud Server. We have a loadbalancer in front of two webservers. Am I supposed to use all three (3) IP addresses (Load Balancer, Web01, Web02) in ...
0
votes
2answers
3k views

Redirect crontab output to email

It looks simple but how can I redirect output of this kind of crontab to my email? 00 06 * * * /usr/bin/php /home/user/myapp/testing.sh -e prod 1>> /var/log/CRONLOGS/testing_prod.log ...
2
votes
3answers
986 views

Is the following cron expression means every 45 minutes? [duplicate]

Possible Duplicate: How does cron handle remainders in “every so often” jobs Am willing to run a script every 45 minute (not the :45th minute of every hour) e.g. 10:00, 10:45, 11:30, ...
-1
votes
3answers
72 views

Why a cron is executed even if I remove the crontab line?

I have a cron that checks if there are pending mails to be sent each minute: */1 * * * * /usr/bin/curl http://localhost/path/application.php >> /var/log/application.log This script is working ...
-3
votes
2answers
162 views

crontab -e on Red Hat 4.1.2-48 [closed]

The following command on crontab does not work at all. 0 12 * * * mysqldump -hserverhpost -uuser -ppass db > /path/to/backu/$(date +%d-%m-%Y) I read extensively about this and i cannot see what ...
1
vote
0answers
1k views

Logrotate doesn't work from cron on CentOS

I have lograotate configured on CentOS 6. It works fine when I run it manually, but with CRON it doesn't work. Cron says in its logs: "All fine, I run you command" but nothing happens. Details: cat ...
0
votes
2answers
668 views

Configure a Sendmail subject using crontab

My cron job is running the following line: */40 * * * * cd /home/qa/prod/seo/casino && make testv 2> /dev/stdout | /usr/sbin/sendmail -t xxxx@gmail.com As you can see I am using the ...
0
votes
2answers
311 views

cron jobs still executing after it is remove in directadmin panel

I have problem on cron jobs that are still executing even after removing them. I already view all the possible cron jobs from this article. All cron config files are empty or my cron task are not ...
1
vote
1answer
56 views

Ubuntu 11.10 Cron Job fails With - Not Found

I have a script that is supposed to run hourly. It was working fine for a while and then it seemed to stop working after some system updates were applied. At that point it stopped working and ...
0
votes
1answer
60 views

escaping in crontab

The following is working as expected at command prompt. But it does not work from cron. # echo "test abc xyz" | grep "test1 \| pqr" # echo "test abc xyz" | grep "test \| pqr" test abc xyz When I ...
13
votes
2answers
541 views

How does cron handle remainders in “every so often” jobs

If I do this: */9 * * * * /path/to/wotnot At what times will the task run in two hours, starting at 09h00 Is it A: 09h00 09h09 09h18 09h27 09h36 09h45 09h54 10h03 10h12 10h21 10h30 10h39 10h48 ...
2
votes
1answer
482 views

edit crontab for apache

I am transfering crontabs from an old server (centos 5.5) to a a new (centos 6.0) and there is a problem with (the most important) user apache. On the new server I am getting the following: ...