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)

0
votes
2answers
36 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
78 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
123 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
446 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
1k 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
513 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
89 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
624 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
313 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
72 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
1k 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
484 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
64 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
153 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
721 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
417 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
191 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
51 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
56 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
523 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
246 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: ...
2
votes
2answers
243 views

Folder synchronization between 2 servers

I would like to share my problem with you. My boss wants that I will create 2 folders on two different servers. My first server is located at Germany and second one is in India. I have admins access ...
2
votes
2answers
255 views

Running a script containing find with a regexp fails in cron but works in a shell

I have the following script in my /etc/cron.d: 19 15 * * * root /opt/scripts/clean-nexus-release-repo.sh The clean-nexus-release-repo.sh script looks like this: #!/bin/bash find ...
0
votes
1answer
139 views

Crontab start a screen

I started a screen by shell script in crontab, when I entered the screen, the left side became "sh-4.1#". While I runed the script directly, it was nomal with "[root@localhost data]". What happened? ...
1
vote
1answer
85 views

Mis-typed crontab line caused strange operation

So, I meant to put in the following entry in my crontab: */5 * * * * /command/to/run/every/5/minutes but accidentally typed **/5 * * * * /command/to/run/5/times/a/minute So, the command ran 5 ...
-2
votes
2answers
61 views

cron job allowed commands

i can use this command in cron job cat /etc/passwd its send my an email about all users info how i can see allowed command? like cat ! can i use service httpd restart? ( i test it and i cant) ...
1
vote
4answers
97 views

Checking for changes to cronjobs

Any way check and notify if some one made a change/addition to cronjobs for a particular user on a Linux server? Is it possible to know the changes made too?
-2
votes
1answer
3k views

CRON opens and closes sessions continuously

I'm seeing a huge amount of these lines in my auth logs: Dec 31 03:45:01 xxxxxxx CRON[17259]: pam_unix(cron:session): session opened for user root by (uid=0) Dec 31 03:45:01 xxxxxxx CRON[17259]: ...
2
votes
1answer
537 views

Cron jobs running twice - Ubuntu server 12.04

I have a couple of simple cron jobs running under root. However, they seem to be running twice, and I can't figure out why. No other users have any cron jobs running and the the only cronfile is for ...
1
vote
1answer
51 views

crontab runs only 2nd line

I have /etc/cron.d/remote-server-backup as follows: ***starts*** MAILTO="log@automatem.co.nz" 23 1,7,13,19 * * * root /usr/local/bin/backup-server nzs1.automatem.co 43 2,8,14,20 * * * root ...
6
votes
8answers
1k views

make a cronjob wait for previous rsync job to finish

I'm using rsync to backup some data from one server to another. All works fine, but it might take longer to finish depending on how much data there is to transfer. Is there any gauranteed way to ...
0
votes
5answers
87 views

Where to store custom php scripts called via cron

I want to move my php scripts out of the /var/www so that they are not accessible via a URL. But where is the most logical place to store these?
0
votes
1answer
36 views

Logrotate Creating Empty Rotated Files

I have the following parameters set up for the log rotation of a log. size=10M, rotate 800, copytruncate, missingok. 800 rotated files are being created, but many of them are below 10M and some of ...
2
votes
2answers
443 views

Cron job doesn't seem to work

I scheduled a task every 5 minutes in my crontab. The task is well-scheduled by activating the cron log in rsyslog and checked that it executes as planned: - Right user - Right command Sample log ...
-1
votes
2answers
163 views

copy cron job from one domain to another on same server

I have just set up the .com of a domain that previous ran on .co.uk on the same server, I have copied all the files, ran through them using bash to change the domain anywhere it was referenced, same ...
1
vote
0answers
34 views

Synchronising local XML files with Remote FTP and Vice Versa

I have developed a website in php/codeigniter that takes data from sage xml files. I have SAGE xml files on my remote sever that I am using on my website for data extraction.I am reading and writing ...
2
votes
2answers
132 views

Runing perl Script using root cron told me “access denied”

This comes from here Now it runs, but when i run it using the root crontab, it told me: *tail: /var/log/backupeitor.log: file truncated /bin/sh: /home/backup/scripts/backupeitor.pl: Permission ...
3
votes
1answer
75 views

Daemon to manage maintenance scripts

I have a bunch of "night shift scripts" to maintain a server. The problem is, the "action window", when those scripts may run is always different. Sometimes there's nothing going on for minutes and ...
2
votes
1answer
220 views

Cron job “if-unless” structure?

I'd like to set up this database backup routine with cron: Every month on the first, do a full backup Every Sunday of the week, do an incremental backup - unless it's the 1st Every day of the week, ...
1
vote
1answer
110 views

Linux cron spamming me then stops about php/suhosin

My server emails me when any messages goes to root. cron sends me messages. Today I got over 300 emails from my server all of which are PHP Warning: PHP Startup: Unable to load dynamic library ...
0
votes
1answer
210 views

linux cron mysqldump: php exec() vs shell script vs direct command in crontab

The system is running CENTOS 5.8, Apache 2.2.3, MySQL 5.0.95, PHP 5.3.3 We run mysqldump daily for a few databases. It's run via a php script called in crontab. They are run at the same time and ...
0
votes
1answer
75 views

Can I globally set to cut off too big cron e-mails?

Is there a way to limit the body of all e-mails sent out by cron (to MAILTO receivers) to a specific length. If the particular output exceeds the limit, it just gets cutt off at that point. Is there ...
1
vote
5answers
122 views

Solutions for scheduling cronjob

I have setup a list of cron, Some of the cron script takes a long time to run (like 1-5 hours, and they are increasing every day). I do not want to run two cron scripts at the same time, as I do not ...
1
vote
2answers
318 views

How to schedule job to run on Linux/Unix only when system is idle?

How do I schedule a job to run only if the system is idle? E.g. I want to run some cleanup task every week, but only if it does not interfere with other users. I know I can schedule a task to run ...
2
votes
2answers
733 views

Reboot if tomcat7 service is not responding

I am running a web app on a Tomcat server. There is a hard-to-detect problem within the server code that causes it to crash once or twice everyday. I will dig in to correct it when I have time. But ...
2
votes
3answers
2k views

Why does my CentOS logrotate run at random times?

I put a logrotate configuration file in /etc/logrotate.d/ and expected the logs to rotate at a consistent time; however, they do not... log rotation times are seemingly random +/- one hour. Why are ...
0
votes
3answers
268 views

cron job running repeatedly, why?

Why is this cron job executing repeatedly over time and what can I do to stop it? I have a cron job that is supposed to run at 4 each morning. It hits a php script that executes some daily data ...
1
vote
0answers
122 views

Intermittent sudo failure - SuSE 10

We have a longstanding production issue where cron on certain servers periodically report the following error- sudo: uid NNN does not exist in the passwd file! The user does exist, in fact it is ...
-1
votes
1answer
198 views

How to reliably run a batch job every 5 seconds?

I'm building an application where the sending of all notifications (email, SMS, fax) will be asynchronous. The application will write the notifications to the database, and a batch job will read these ...