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
306 views

Strange syslog for my server

Today i go on my log with nano /var/log/syslog I have this, and i think it's not very good : Aug 27 06:25:02 ks3309528 rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="2235" ...
2
votes
2answers
230 views

check if process is running, even under cron

I have a cron job that runs every minute, but if it finds data, might take many minutes to finish. I need to tell if another instance of the script is running from another. To make things even more ...
3
votes
3answers
82 views

How can a sh script determine if it was started as a cron job as opposed to interactive or background?

I'd like to use the same scripting for cron and interactive, just wondering if there was a universal way over UNIX/Linux systems to easily make this determination.
-1
votes
2answers
442 views

Cron permissions (root, usergroup) - could not open input file [closed]

I have a server for which I have created a cron job "sendalerts" to users. Mind you this "sendalerts.php" should be runnable from two methods (via browser and also via a cron job) So cron's job is to ...
1
vote
0answers
68 views

Rotate svnserve logs; HUP needed?

I have SVN running on CentOS Linux 6.4 with svnserve and pass --log-file=/var/log/svn.log in the config file. This log is very large now and I need to start rotating it. I figure to add it to ...
1
vote
2answers
1k views

Incrond running but not executing commands CentOS 6.4

I have copied this question over here from StackOverflow... I have installed incron from the EPEL repository (0.5.9) (before you ask; YES, I also tried downloading the source and compiling locally ...
1
vote
1answer
102 views

Script doesn't work as cron job [closed]

I have a script that I wrote to verify on an OS X machine (v 10.7.4) if a volume is up or down. If it goes down, it is supposed to send an email. When I run the script from the command line, it works ...
0
votes
1answer
247 views

How to stop long-running cron process from being killed

I have a long-running cron process, running a Python script, that seems to get randomly killed. In dmesg I see: [230568.077358] init: cron main process (890) killed by TERM signal [237517.974422] ...
0
votes
0answers
121 views

Cron sends e-mails but shouldn't

I'm getting crazy. Cron bombs me with e-mails, even if I set a nullstring as e-mail address and pipe the output to /dev/null. Currently my crontab looks like this MAILTO="" # m h dom mon dow ...
1
vote
1answer
158 views

cron create output file only if there is output

I have a cronjob that calls a script. I want the output to be placed in a log file. The problem is that the log-file is created even if there is no output. Since the job runs once an hour, and ...
0
votes
1answer
235 views

Issue with ifconfig in a shell script (using cron)

If I execute this script manually in Debian: #!/bin/bash /sbin/ifconfig wlan0 down /sbin/ifconfig wlan0 up sudo iwconfig wlan0 essid "WLAN_NETWORK" sudo iwconfig wlan0 key myPassword sudo dhclient ...
0
votes
1answer
102 views

celery tasks from one domain appear on another domain's django admin hosted on the same box

I have a rather funny problem that I didn't manage to find it elsewhere. I have 2 django-celery projects running with redis on 2 different domains, but apparently hosted on the same box. I don't have ...
0
votes
1answer
50 views

Strange crontab behaviour [duplicate]

This evening I have been playing with cron for the first time, and have started experiencing strange results. The script that I am trying to run is a watchdog that allows me to manage a couple other ...
1
vote
2answers
98 views

Redirect output from cron in real time, not after program has finished?

I have a ruby script that writes to STDOUT and sometimes STDERR. I am running this script every 5 minutes via a crontab: */5 * * * * /root/myscript.rb >> /var/log/myscript.log 2>&1 What ...
0
votes
1answer
294 views

Cron job does not generate expected log file

I'm trying to execute a shell with crontab. The cron job executes the shell but doesn't generate the log file i need. This is what i'm using for my cron: 10 * * * * /home/user/3nvo.sh This is a ...
0
votes
2answers
864 views

Ubuntu Crontab or init script startup [duplicate]

What am I doing wrong here with cron on boot? Example: To launch manually: screen -S example ./script.sh To recover manually: screen -x example now, I just try to do the same thing (well, the ...
0
votes
1answer
73 views

How to set “Max. Allowed Cronjob types (chrooted and full implies url)” to Full Cron for the ISPConfig admin user?

I'm using ISPConfig with the admin account and created a couple of sites. When I add a cron job the following line is added in the /etc/cron.d/ispc_chrooted_web3: SHELL='/usr/sbin/jk_chrootsh' ...
-2
votes
1answer
107 views

CRON to run every 15 minutes for one week?

How do I create a CRON job so that it runs every 15 minutes (24 hours a day) but for one week only and exits? Thanks!
4
votes
1answer
125 views

How can I create cron jobs in specific files on Linux Centos

I want to have a separate folders for cron jobs like: /mydata/cronjobs Now in that folder I want to have files like backup_server which will have the content like: 30 3 * * 1-5 ...
1
vote
2answers
360 views

How to prevent termination of long-running Python script

I have a cron job running a Python script on a VM-based remote Ubuntu server. The script takes a couple hours to run, and I'm noticing the kernel appears to be terminating the script before it ...
-1
votes
1answer
300 views

Plesk cron iOS notifications randomly stopped working [closed]

Recently, I started getting these cron error from Plesk. This cron controls push notifications to Plesk Manager on my iPhone/iPad. Obviously, turning off the cron stops the error but I want the cron ...
1
vote
1answer
54 views

Cronjobs putting archive in wrong directory

I am running a website on an Amazon ec2 instance running the default Debian linux. I set up a cronjob to copy the site files, take a database imprint, and zip them up. I want to keep the file ...
6
votes
1answer
438 views

how to execute a command on the first, second, third and fourth Sunday of the month with crontab [duplicate]

I have 4 servers and I want each one of them to execute a reboot on Sunday. Server 1 - first Sunday of the month (first week) Server 2 - Second Sunday of the month (2nd week) Server 3 - third Sunday ...
0
votes
1answer
66 views

what is the meaning of *this* crontab setting?

* */1 * * * sh foo.sh I found this setting on one production machine. And foo.sh was executed every one minute. I am guessing that the original author of this setting wants it to be executed every ...
0
votes
2answers
51 views

cron job to archive files older than xyz days [closed]

I would like to archive all of the files older than Xdays. the files are in /home/user1/ and i would like to move the archive to /home/user1/folder_backup/ i am running ubuntu server 12
1
vote
1answer
108 views

Crontab group permissions

I have noticed on my debian machine that the crontab user does not have read permissions on the /var/spool/cron/crontabs directory. drwx-wx--T 2 root crontab 4096 Jun 20 21:34 crontabs Further more ...
0
votes
1answer
166 views

Why is this cron job with shell script failing? [duplicate]

I created a cron job to do a daily backup, to store it in the directory /backups This backups directory is located at the root [/] of the VPS server and is a separate backups partition provided by ...
0
votes
1answer
41 views

Can't locate cron service, how to start it?

# rpm -qa | grep cron crontabs-1.10-5.noarch I have the above version of cron installed on my RHEL 6 server. My crontabs commands aren't reconginzed: # crontabs -l -bash: crontabs: command not ...
0
votes
3answers
379 views

script PHP doesn't work in crontab [duplicate]

Good morning, I have into my ubunut server a script that check into a database some value and if the condition is true send some email. If I launch into the browser the script like: ...
-3
votes
1answer
25 views

cronjob every sunday of the week [duplicate]

Hi all I have an ubuntu server where I want to create a cron every sunday al 23:00 I have read manual and I have try to use some cron generator. I have tried in this mode: 0 23 * * * root test.php ...
1
vote
1answer
39 views

Setting up a new job using ubuntu's crontab [duplicate]

I have little experience with setting up cron jobs. I need to configure a cron job to delete all files starting with the filename 'sess_' from the '/tmp' folder every hour. If I fire up the crontab ...
0
votes
1answer
67 views

Cron job: stdout to /var/log, stderr to email

I have a cron job that is running every hour, and providing output (over stdout) similar to the following: Found 1 batch jobs {'job': 'update'} Job 1 started at 2013-06-07 13:00:03.673683+00:00 ...
-1
votes
1answer
388 views

ESXi 5.0 can't parse crontab (ghettoVCB) [duplicate]

I'm trying to run ghettoVCB via cron on a ESXi 5.0 Machine. This is the command (add some linebreaks for better readability) /vmfs/volumes/VMs\ Pool/ghettoVCB-master/ghettoVCB.sh -f ...
0
votes
2answers
639 views

Cron job in webmin

I have a webmin on Centos server. I want to create custom cron job. However there is cron job setting options available under "Scheduled Cron Jobs" tab. But if I want to set weekly cron then there it ...
-1
votes
1answer
64 views

Cron and FTP daemons crashing randomly in RHEL

Not sure where to start in troubleshooting this. I'm not finding anything indicating an issue in ProFTP logs or in /var/log/messages. So I do apologize for not having more information to give. ...
0
votes
1answer
57 views

crontab in different sessions

I started a crontab job in a server remotely (in a screen session) from a local machine. Days later, I terminated the screen session and restarted my local machine. The cron job in the server is still ...
1
vote
1answer
197 views

Cron expression that runs every 5 minutes from 1:30 am - 6:00 am [duplicate]

I'm looking to run a job at these very specific times. Can this even be done in one expression?
0
votes
0answers
93 views

Why doesn't this cron behave the same way when run from CLI?

I have this cron for user root (obtained with crontab -l): 20 10,14 * * 1-5 /usr/sbin/puppetd --onetime --no-daemonize --logdest syslog > /dev/null 2>&1 When it is run, it is supposed to ...
-1
votes
2answers
240 views

mysqldump in cron not working [duplicate]

I am trying to do a mysqldump on the cron for every 5 minutes but it seems that it is not working. I try to execute the mysqldump and it works fine. mysqldump mysqldump -uroot -ppassword ...
1
vote
2answers
126 views

Which user should cron jobs run as?

Ubuntu server with users root www-data mywebsite1 mywebsite2 There are multiple websites hosted on this server, each with their own user. Each website has their own cron jobs mostly ...
1
vote
2answers
132 views

Read-only cronjobs for users

Here's a weird issue. I want to make crontab for a user that is read-only for that particular user and can only be managed via root. Sounds easy? Here's the catch: $ ls -alh /var/spool/cron/my_user ...
0
votes
1answer
22 views

Ubuntu Server scheduleing a cron job not working

I am trying to schedule a cronjob on my ubuntu server through SSL. I ran the command: sudo crontab -e Then once it created a new file for my user, I put : * * * * * php /etc/php5/apache2/php.ini ...
2
votes
1answer
61 views

schedule a job to run only “once” after 50 seconds

I have a process which is designed to do a specific task in case of events. Requirement is to run a specific command 50 seconds after an event occurs. Cannot modify the code to put sleep there as it ...
2
votes
2answers
971 views

how to execute bash script with crontab in centos? [duplicate]

My bash file is not executed by cronjob created as root. The cronjob setup looks as it follows 0 0 * * * mysql_backup.sh does need to be decalared with the bash command 0 0 * * * bash ...
0
votes
2answers
478 views

centos cron logs are not executed

I have been trying to setup a cronjob on centos but doesn't seems to work. I have been deleting the crons logfile to see all newly created logs and I have been restarting crond but /var/log/conf ...
9
votes
1answer
2k views

How do I make cron run every other Sunday on the OTHER Sunday?

I have a cron job that runs at 0 0 * * 0/2 -- i.e. every other Sunday. It just ran now, for instance. However, I want it to run on the other Sundays -- next Sunday, rather than this one. Another ...
0
votes
1answer
67 views

No way to make a specific cronjob work [duplicate]

I installed nginxcp on my server and they recommend to add the following cron: 0 */1 * * * /usr/sbin/tmpwatch -am 1 /tmp/nginx_client I already added it to var/spool/cron and restarted crond ...
0
votes
1answer
253 views

Review of a crontab script to add timestamps to minutely runs; any suggestions?

I've got a crontab job set to run minutely as such: * * * * * /home/username/public_html/domain.tld/production/scripts/cron_runner.sh My goal is to add some timestamps to output from cron so I can ...
0
votes
2answers
61 views

using ssh to automatically retrieve info from remote box

Greets all. I need a 'basics-202' question answered; it's been a while. From a cronjob, how do I automatically ssh to a remote box to retrieve information that normally requires root equivalence to ...
1
vote
1answer
180 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. ...