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)

2
votes
1answer
432 views

logrotate cron job not rotating certain logs

I added two scripts in "logrotate.d" directory for my application logs to be rotated. This is the config for one of them: <myLogFilePath> { compress copytruncate delaycompress dateext ...
0
votes
1answer
121 views

Logrotate rotating daily but should be rotating weekly

For some reason logrotate is rotating logs daily instead of weekly, even though all the config files for logrotate seem to be set to weekly. Any ideas? /etc/cron.daily/logrotate #!/bin/sh test -x ...
0
votes
1answer
572 views

rsync over ssh fails as cronjob works on shell - NAS4Free

This is my rsync.sh in the home directory of my backup user $ cat rsync.sh #!/bin/sh rsync -avvvz --stats --log-file="/var/log/rsync_client.log" -e "ssh -i /mnt/stor0/backup/backup-rsync-key" ...
0
votes
3answers
999 views

Cant run rc.local manually and doesn't run automatically on ubuntu

This is quite a simple one. I created an rc.local file here: /etc/rc.local I made it executable. However, it doesn't run when I boot the server. I can see it in the directory and when I try to run ...
0
votes
1answer
77 views

Changing IP of the machine at regular intervals

I have a pool of public IP addresses. There are some services in my box which binds to these. What i'm trying to achieve is to automate the IP change process. Best way to do this is to write a script ...
0
votes
0answers
194 views

dd-wrt obfsproxy - Cant start on startup or via cron job

Router: WZR-HP-AG300H Firmware: DD-WRT v24SP2-MULTI (06/03/12) std - build 19154 To get obfsproxy installed on my router I went about Installing Opkg With opkg installed obfsproxy and busybox ...
0
votes
1answer
126 views

Running cronjobs with proxy

I have a requirement where I have to run several cron jobs with specific IP in an EC2 instance. That specific IP is used by another EC2 instance. I have access to that EC2 instance. Is there any ...
0
votes
1answer
51 views

Centos: List all cron jobs in a week ordered by date

I'm trying to get all cron jobs in the current week (or from monday to sunday) ordered by schedule time. I'm trying with some elaboration on the output of the command crontab -l I appreciate ...
-1
votes
2answers
78 views

Curl don't work on cron execution

I have bash a script like the following #!/bin/bash date curl http://lab.nextt.com.br/somefile1.html -z ../public_html/somefile1.html -o ../public_html/somefile1.html --silent --show-error ...
-1
votes
2answers
601 views

Running multiple cron jobs from single script

I have three different jobs that I want to run from the FreeBSD shell. I would like to consolidate them into a single script, if possible, but I can not find any syntax to do that. Is there someway I ...
0
votes
1answer
189 views

Mysql select query not generating result on cron but is ok via terminal

We have a C program (source is below). We compile it with: gcc -Wall -Wextra -g $(mysql_config --cflags) get1ReceiveSource.c $(mysql_config --libs) -lrt -o get1Receive The select give results ...
1
vote
3answers
99 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
211 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
195 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
303 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
902 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
242 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
88 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
57 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
406 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
478 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
67 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
151 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
124 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
130 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
147 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
241 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
113 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
236 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
180 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
85 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
230 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
99 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
599 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
195 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
255 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
68 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
40 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
82 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
1k 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
189 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
477 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
2k 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
773 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
94 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
913 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
428 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
85 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 ...