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
2k 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
667 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
67 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
159 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
856 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
527 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
239 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
52 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
58 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
533 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
338 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
277 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
348 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
147 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
87 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
62 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
110 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?
0
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
766 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
91 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
38 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
517 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
189 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
36 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
148 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
80 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
224 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
127 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
246 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
77 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
133 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
348 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
3answers
947 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
3k 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
323 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
125 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
207 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 ...
1
vote
2answers
99 views

What is wrong with those crontabs?

I want my projectors to Power On before the mall opens, and Power Off when the mall closes. So I created crontab entries (that I placed in /etc/cron.d/mall), but today (Thu Nov 22 18:58:29 EST 2012 is ...
0
votes
1answer
78 views

How can I find a cron job that is causing a huge spike in CPU and Network

Everyday at 4am my linode graphs shows a huge spike in CPU, Network, and Disk IO. The CPU spikes to 45%. How can I find out what is causing this? I took a look in /etc/cron.daily/ but there are a ...
1
vote
2answers
121 views

libc segfault when running cron

I am trying to submit the job using drqueue's sendjob tool. When doing this from the terminal it works just fine. However, when doing this from cron, I get segmentation fault at libc (2.11.3-4). I ...
1
vote
1answer
133 views

script executing perfectly in terminal but not in cron

I setup a script for to take an mysql db backup everyday on a specific time, so now the cron is running perfectly it executing the script without problem but the problem is db backup file is not ...
0
votes
1answer
170 views

what does the --backup-mode option for rdiff mean?

I've got rdiff-backup up & running nicely using cron jobs over SSH between two VMs (my webserver and a backup space), using scripts put together from various places online. I'm backing up various ...
33
votes
3answers
15k views

Why is my crontab not working, and how can I troubleshoot it?

This is a Canonical Question about using cron & crontab. The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below. This addresses the cron system with ...
4
votes
2answers
80 views

Checking that tasks are executed

I'm not sure how to explain this. Once one starts having dozens or hundres of servers, each running some sort of periodic jobs (mostly from cron), there is a problem of making sure (or as sure as ...
0
votes
2answers
212 views

Hidden Cron in the Webserver cant find out where its located …?

in my dedicated server i have i have hidden cron job (one of the cpanel user account is using) running which is not showing up anywhere (installation is based on cpanel/whm) first i had a look at the ...
1
vote
0answers
96 views

rkhunter (1.3.8), crontab, ubuntu 12.04.1 — Very strange behavior

1.3.8-10 Rkhunter, Ubuntu 12.04.1 I have a strange problem with rkhunter. I haven't found anything helpful after googling extensively... for days. If I run rkhunter from crontab I'll get a bunch of ...
0
votes
2answers
262 views

How to add cronjobs to /etc/cron.daily/

We have to use crontab -e to add a cronjob to crontab. And crontab -r to remove cronjobs. Here, no Copy & Paste not allowed. I need to add a script to cron.daily, how to add?
-2
votes
1answer
87 views

Possible to run commands in a screen through cron jobs?

I currently have an application running in a screen. I would like to run some commands in the screen through a cron job but would like to know if this is possible. Using CentOS