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
1answer
208 views

What could cause a PHP script run as a cron job to end up in D state?

My server is running Ubuntu 12.04 LTS (precise) and I'm having a weird issue. The server is hosting a large website which is used for data collection. The website is in PHP and uses Zend Framework. ...
0
votes
2answers
1k views

Crontab not sending e-mail with output [duplicate]

I'm having a strange problem here with crontab. I have set up the crontab correctly to run the cron job as follows: [user@user ~]$ crontab -e SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin ...
-1
votes
1answer
93 views

Cron Find & Replace via ssh - send a result via mail [closed]

I'm having a small issue, i'm running and cron task every 5 minutes which is looking text chain and replacing it with nothing.. In order to optmize something i would like to add a new function to my ...
2
votes
2answers
945 views

cron daemon forking multiple processes and running jobs multiple times

I'm running a bunch of cron jobs (set up using sudo crontab -e) on Ubuntu, and recently (though I don't know when to be sure) I'm suddenly seeing the same jobs appear to be run multiple times in the ...
0
votes
1answer
244 views

Why this command does not work from cron.daily file?

I have a file in cron.daily: root@nagios.example.com:/# cat /etc/cron.daily/nagios-logs /usr/bin/nice -n 19 /bin/gzip --fast /var/log/nagios3/archives/* root@nagios.example.com:/# ls -l ...
4
votes
2answers
1k views

Why this script in cron.daily won't run?

I wrote this small Python script to make daily backups of a directory containing some files (the backups should rotate after one week). This is it: $ cat /etc/cron.daily/file-store-backup.py ...
0
votes
2answers
92 views

Checking that PostgreSQL and Apache are running on Ubuntu?

I am trying to learn the best practices for checking that Apache and Postgres are running on my server. If either of them have stopped, I want to auto-restart these services. I'm using Ubuntu 12.04 ...
15
votes
2answers
506 views

Is there a utility like cron, that schedules a job for later (but only once)?

I'm trying to design a program that sends a text when a certain (non-periodic) event occurs. Right now, I'd like a script that finds when this event occurs, and then schedules a (cron-like) job that ...
1
vote
1answer
251 views

Getting cron logs to add to file, not override it

First, I'm sorry if this is the wrong stackexchange for this, but it seemed like the right one. This is my crontab right now: MAILTO=****@gmail.com 10,30,50 * * * * ~/webapps/****/apache2/bin/start ...
1
vote
2answers
2k views

Why does cron not mail me the job output?

Here's my crontab: MAILTO=michael 02 11 * * * bash /home/michael/projectname/nightly_tests.sh * * * * * python /home/michael/projectname/throwaway/hello.py My username is specified correctly: ...
0
votes
2answers
756 views

Debian webserver - Crontab error (not running php script)

I've a webserver with several sites and I'm trying to run a script by crontab but it gives me a error (126 and 127) My script is in: /var/www/site1/script.php When I run the command: php ...
0
votes
2answers
286 views

Does cron maintain an in-memory directory cache?

We run a large distributed Linux computing environment where a user's home directory may be moved between different back-end filestores due to their affiliation and general distribution between ...
0
votes
0answers
204 views

mysqldump not working/running via cron job [duplicate]

I have a crontask which runs at 1am every morning and dumps all databases. 0 1 * * * /var/backups/dumpit.sh 2>&1>> /var/backups/dumpit.log The dumpit.sh source: #!/bin/bash ...
-1
votes
2answers
106 views

Centos 5 - Configuring a crontab PHP job [duplicate]

I'm running a CentOS 5 server, and trying to schedule a job which runs a php file every day at the same time, I've added a new file to the directory /etc/cron.d/ called get_files The get_files ...
0
votes
2answers
512 views

Crontab on Ubuntu Server 12.04 doesn't run as it should (PHP script)

I have a PHP script which downloads and manipulate an image from some server and then saves it locally. Because image is update every 5 minutes I want to download and save that image every 5 minutes ...
2
votes
2answers
579 views

Cron job executed multiple times daylight saving time [duplicate]

We run a CentOS release 6.2 (Final) 2.6.32-220.13.1.el6.x86_64 with a stock cronie.x86_64 1.4.4-7.el6. On Mar 31 we moved to summer time: 03:00 become 04:00. In crontab we have: 0 4 * * * ...
0
votes
2answers
251 views

crontab -u admin -l doesn't list cronjobs that are defined in directadmin backup crons as admin user

I have defined 1 cron job to take a backup of all of my users in Directadmin. Some users needed more than just one monthly backup. So I logged in again as admin user and went to Admin Backup/Transfer ...
4
votes
0answers
6k views

Do I really need the PHP maxlifetime hourly cron job? [closed]

On my Debian Wheezy, every half-hour a cron job runs: find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -ignore_readdir_race -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} ...
1
vote
4answers
2k views

Randomizing minute for crontab entries between servers

I have a common puppet recipe for a set of our servers. One of the puppet-managed files is /etc/crontab that contains the original cron.daily, cron.weekly and cron.monthly entries. The problem of the ...
0
votes
1answer
549 views

@reboot cron directive doesn't work on Solaris? What do I use instead?

I just tried to use contab -e on a Solaris server to add this line: @reboot /root/reboot.sh The script starts up the web application. But the trouble is that this syntax is rejected. # crontab -e ...
1
vote
2answers
241 views

Run php script every 3 seconds

how can I set a cron job or a php script details to run a php script every 3 seconds between 11:30 PM and 12:30 AM (23:30 - 0:30)? Thank you very much for your help
0
votes
1answer
45 views

Options for Executing Scheduled Scripts on a PHP Server

I have a server that I've setup running PHP. This serves JSON files and is running fine. I also have several scripts that reads data from an outside source, connects to my MySQL Database Server, and ...
3
votes
1answer
629 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
175 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
759 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
2k 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
86 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
268 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
194 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
60 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
139 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 ...
0
votes
2answers
1k 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
226 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
103 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
236 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
335 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
423 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
2k 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
374 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
116 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
533 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
758 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
2k 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
88 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
185 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
152 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
142 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
166 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
370 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 ...