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
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 ...
1
vote
2answers
96 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
71 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
117 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
120 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
150 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 ...
30
votes
3answers
9k 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
78 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
183 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
95 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
199 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
84 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
2
votes
1answer
71 views

How to handle many daily emails from cron efficiently?

With each new server comes at least one more daily crontab email. The FreeBSD servers even send two: a daily and a security run output. Thanks to my obsession with virtualisation the number of emails ...
1
vote
2answers
84 views

Effectively managing crontab

My crontab looks something like this; 1 * * * * /var/www/cron/site1.sh > /dev/null 2>&1 0 * * * * /var/www/cron/site2.sh > /dev/null 2>&1 3 * * * * /var/www/cron/site3.sh > ...
0
votes
1answer
206 views

Evaluate cron expression

Is there a command line tool that will simply evaluate a cron expression and return a bool response if it is supposed to be running right now? I'm looking for something I can use as a utility in ...
3
votes
3answers
266 views

Setting up logging for a remote backup script

So I wrote up a short script that I am planning to run via a cron job daily to package up my site files and send them to a remote location. I also plan to incorporate DB dumps, but I have not gotten ...
-1
votes
2answers
78 views

Where is the cron job?

I work with linux servers at my job. Previously there was an engineer that set up our PBX servers so that they send a call to land line phone. It does it every hour. I have been looking for that ...
0
votes
5answers
525 views

Add Cron Job to Several Servers

What would be the best way to add a new cron job to several servers simultaneously, or to automate the creation of a cron job on several servers. I am planning on using rysnc to push a bash script ...
0
votes
1answer
71 views

Parenthesis in cronjob results in error

I am trying to run the following cronjob and I am getting the following error: /bin/sh: -c: line 0: syntax error near unexpected token `)' for the line: mysqldump --opt -Q -h localhost ...
-2
votes
1answer
63 views

How to log into server using ssh connection (Im using helios) [closed]

My host has quoted me this: Have you checked that your php script runs OK from the command line? The cron process needs to activate the command-line version of php - /usr/bin/php - because it ...
0
votes
0answers
167 views

Automating rsync job with cron

I'm having troubles getting an rsync script to work on cron. I know this is a question that's been asked aplenty, but I've read all the answers I can find, and followed all of the instructions, but ...
0
votes
3answers
2k views

Command does not execute in crontab while command itself works just fine

I have this script from Colin Johnson on Github - https://github.com/colinbjohnson/aws-missing-tools/tree/master/ec2-automate-backup It seems great. I have modified it to send email to myself every ...
0
votes
2answers
243 views

Bash script getting automatically deleted from Ubuntu 12.04 Server?

I'm running a bash script on an ubuntu 12.04 through cron. The script works fine for a few weeks (runs daily backups of websites, mysql databases, and copies to Amazon S3). However, twice now I've ...
1
vote
4answers
146 views

Dynamic crontab file?

Is it possible to make cron receive it's instructions from the output of a shell script instead of reading a static file? I'm trying to manage crontabs across a bunch of machines and maintaining ...
0
votes
2answers
379 views

crontab: command not found in CentOS

I tried to setup a cron job in my new CentOS VPS server over SSH. I typed in the command crontab -e and I got the following error message:- -bash: anacrontab: command not found Any idea how I can ...
2
votes
2answers
351 views

Cron not running CentOS

What am I doing wrong here? Trying to set a cron job to run a shell script but it won't work. I entered the below after doing crontab -e. It does show up when doing contrab -l. 0 2 * * * root ...
0
votes
2answers
388 views

Root crontab not executing script

I have a script listed in my roots crontab 07 9 * * * /opt/HLRSDATA_2010_OCT/HLRS_Scheduler_sp.sh > /opt/HLRSDATA_2010_OCT/logs/HLRTKJob.log This script contains the following #!/bin/bash echo ...
1
vote
1answer
68 views

crontab not executing all lines

I have a sudo crontab like this to sync time: # m h dom mow dow command 0 6 * * * ntpdate 10.3.3.3 >> /var/mylog/ntp.log 0 7 * * * /var/mylog/backup.sh >> /var/mylog/backup.log The ...
1
vote
4answers
169 views

Is it possible to delete the last line within a file using a command?

I've accidently distributed a line to /etc/crontab on many servers and i noticed that there's a typo in this line and i need to change it on all servers.
0
votes
1answer
254 views

SFTP download the files and then i wanted rename the server files how to do this?

I have to setup with the banking interface where I need to connect to the remote bank and then download the files in the bank server in-box to my local server for further processing so i do following ...
1
vote
1answer
680 views

How do I rotate old log files to long-term backup?

I have logrotate set up to archive logs for 30 days; how do I set up my cron job to rotate them automatically from /var/log/net to the long-term storage I have mounted on /mnt/backup? I do not need ...
0
votes
2answers
587 views

How to customise email headers from Vixie-cron (debian) and msmtp?

I have had some trouble with getting cron to send emails. My ISP requires that the "From:" field match the email address the email is being sent from, otherwise the email is rejected. As cron ...
0
votes
4answers
138 views

Assigning environment variables for CRON

I have a .sh script that creates a .tar.gz file and transfer's it to a remote server using RSA keys for authentication. The script will run from terminal but it will not when I try to set it up as a ...
1
vote
4answers
551 views

Cronjob to Create Disk Image of Ubuntu Server 12.04 on External USB Hard Drive

I have a 1TB external hard drive and would like to take a snapshot of the entire server periodically (maybe once a week). For cronjob part, I plan on pointing to a bash script in: $ sudo crontab -e ...
0
votes
1answer
490 views

let CRON send emails through SMTP ( debian squeeze )

i would like to send emails whenever a cronjob has completed, i read that this is possible with exim4. in /etc/alias i added the line myuser: mygmail@gmail.com in /etc/exim4/update-exim4.conf.conf ...
5
votes
4answers
293 views

Crontab running before nfs mounted

Running Cronjob @reboot returns that file on nfs share does not exist. Example @reboot python /abs/path/to/script.py mail from crontab on startup reads "more or less" /usr/bin/python can't open ...
2
votes
1answer
123 views

running anacron as non root issue

I was tring to run anacron as non root. But my RHEL doens't have -S option on anacron. Since the default spool directory for anacron is /var/spool/anacron, does it mean as a non root user, I can't run ...
2
votes
2answers
553 views

anacron screws my crontab?

My system is CentOS 6.3 , I notice my /etc/cron.daily are not executed at 4:01 AM , instead , these scripts are executed at random time . I searched and seemed it is 'anacron' that screws up my ...
0
votes
1answer
98 views

When will ANACRONTAB run cron.daily?

My RHEL has the following anacrontab config file, it has START_HOURS_RANGE and RANDOM_DELAY both missing, what hour does cron.daily start everyday? My guess is it is random. Is it true? # ...
2
votes
1answer
257 views

Linux Nginx + php-fpm + cron + mysqld = always out of memory

I don't get it. I have a VPS with Nginx and php-fpm and MySQL. Should be very lightweight. No Apache, right? When I reboot, it is very lightweight. ~ 50/481 MB MEM usage. Very acceptable IMO. And ...
3
votes
3answers
844 views

Amazon EC2 EBS volume scheduled backup/snapshots using puppet / similar tools

I am not a Linux admin, although I wish I was, and I have seen these questions Amazon EC2 Backup Strategy Amazon EC2 + EBS:: Regular backup plan? Simple Backup Strategy for Amazon EC2 instances / ...
5
votes
3answers
773 views

Supervisor VS cronjob

Actually I'm using supervisor to monitor a process and restart it when it stops for some reason. The problem is that in case of a supervisor crash the process stops get monitored. So I thought to ...
3
votes
1answer
122 views

environment variables generated by at command

I'm inspecting /var/spool/cron/atjobs/a001cf01570e44 with cat, after running the at command from PHP using exec(). It looks like at has prepended the script with lots of APACHE environment variables. ...
2
votes
1answer
161 views

CLI SAPI based daemon, PHP app with cronjobs support

I need to build an CLI SAPI based daemon, PHP app with cronjobs support for iOS platform. We have dedicated server. What kind of PHP environment to run this type of PHP applications?
0
votes
1answer
2k views

Cron for a user not working in Plesk 10/11

I'm having a strange problem with plesk and I can't seem to find an answer anywhere on the official support, so I hope somebody here can shed some light. I'm simply trying to run a script via cron ...
3
votes
2answers
1k views

Avoiding log noise from cron jobs - with syslog-ng rather than syslog

On my small Debian squeeze web server, I have syslog-ng installed (not syslogd, like in this question). Generally, my logs are nice and quiet, with -- MARK -- lines. My /var/log/syslog, however, ...
-1
votes
1answer
209 views

Cron Script to Delete Folder Contents Every 5 Minutes on Media Temple [closed]

I'm not familiar with server-side scripting, but I'm currently using a PHP application on Media Temple to cache JPEGs from four webcams hosted on a server located in the middle of the Indian Ocean. ...
1
vote
1answer
375 views

Mounting fuse sshfs fails when invoked by Cron on FreeBSD 9.0

I have a remote server filesystem that I'm attempting to mount locally on a FreeBSD 9 machine via FUSE sshfs, and Cron for a backup routine. I have ssh keys between the boxes setup to allow for ...
1
vote
3answers
216 views

Debian crontab doesn't run scripts

I'm having problems with setting my crontab script to run. When I execute it manually it works. My crontab file looks like this: 17 13 1-31 * 1-7 ...
0
votes
2answers
99 views

Crontab failing silently for one task but can't reproduce by running same command

I have a cron job that runs a django management command that clears my mail queue. It turns out it wasn't sending, and several thousand customers had not received emails. Any ideas what's going on ...