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
183 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
382 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
121 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
60 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
132 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
317 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
1k 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
91 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
132 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
241 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
578 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
380 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
567 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
68 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
66 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
170 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
249 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
44 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
575 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
28 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
47 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
106 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 ...
-2
votes
1answer
543 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
911 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
70 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
58 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
249 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
105 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
vote
2answers
413 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
199 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
222 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
25 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
69 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
2k 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
908 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
3k 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
70 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
275 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
87 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
205 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
92 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
889 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
237 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
948 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
87 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
505 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
223 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: ...