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

Kerberos master server to slave server automation?

I've set up Kerberos in my workplace running on Centos 6 boxes, and successfully propagated the master server database to the slave and also set up a cron job to update it automatically every 5 ...
0
votes
1answer
37 views

how to use screen with crontab?

I have a screen task running with node (nodemon) I would like to restart nodemon at midinght every day What I do manually is under SSH screen -r myscreen I TYPE "rs" manually I type CTRL+A+D to ...
0
votes
1answer
38 views

How to rotate a log file from crontab?

I have this directive on my crontab: * * * * * /var/www/github/mysite/bin/email email worker await --pid=/var/run/mysite-worker-email.pid >> /tmp/mysite-worker-email.log As you can see all my ...
0
votes
0answers
115 views

Cron Job Crashes the Server?

Can a CURL Cron Job fired every minute crash a server, or it's a problem with the code? I had a shared hosting that worked great, then I added a cron job with enters, using CURL, to a specific URL ...
-1
votes
1answer
34 views

Crontab Certain Days of Week Colliding

I've setup a backup rotation on a centos 6 crontab, one script should run Mon-Sat, the other on a Sunday, never on the 1st of the month. However the weekly (Sunday only) script has been running every ...
1
vote
2answers
31 views

How can I send ALL cron output to syslog rather than email

I am running cron with -m off to stop it sending email and then the -s option is supposed to send all output to syslog. Cron cmdline is crond -s -m off My cron job for testing this is * * * * ...
12
votes
5answers
11k views

Execute rsync command over ssh with an ssh agent via crontab

i have a cronjob: 0 9 * * * rsync -a mydir remote_machine: i installed this with 'crontab -e'. i have an ssh-agent running, and when i execute the rsync command itself it works w/o any user ...
6
votes
2answers
278 views

cron job occasionally not running

I have a CentOS 6.6 server with the following packages installed: crontabs-1.10-33.el6.noarch cronie-1.4.4-12.el6.x86_64 cronie-anacron-1.4.4-12.el6.x86_64 kernel-2.6.32-504.3.3.el6.x86_64 ...
0
votes
0answers
20 views

Debian 8.0 - Cron job not working or not called.

I have the following entry I put in after running crontab -e */10 * * * * /var/www/myApp/script/every_10m.sh The script every_10m.sh exists and is executable. Just for testing purposes it has one ...
-1
votes
4answers
119 views

Check if remote mysql is running

I want a bash shell script that i can run using a cron job to check if mysql on a remote server is running. If it is, then do nothing, other start the server. The cronjob will be checking the remote ...
0
votes
1answer
27 views

Magento's cron.php: Persistent or not? Why putting it into cron?

I have a question regarding Magento. Apparently, to perform scheduled tasks within Magento, it needs to run a script called cron.php. Originally the script was triggered by an on-server crontab using ...
0
votes
1answer
28 views

Crontabs and SSMTP?

I'm trying to send an email through cron and ssmtp. I created a script with this #!/bin/bash printf "Subject:test\n\Test text" | ssmtp email@adress.com The script works fine when run from the ...
0
votes
0answers
10 views

Setup efficent cron for running a script [duplicate]

I have to run a script which runs every 10 min between these hours everyday 6:50-7:30, 10:50-11:30, 13:50-14:30, 16:50-17:30, 19:50-20:30 What will be efficent crontab with minimum no of lines.
0
votes
4answers
4k views

APT FATAL -> Failed to fork

I saw a lot of questions regarding this, but mine seems a little different. Here's what I receive: /etc/cron.weekly/apt-xapian-index: FATAL -> Failed to fork. run-parts: ...
0
votes
0answers
74 views

before to excute a cron job, how to make a delay if there is other cron job running

i have a web application allow the user to add cron jobs to the server, and the user can select the time he wants, and allow them to add more than one cron with a different parameters, when the cron ...
1
vote
2answers
40 views

Why is the cron ENV different from the user's ENV?

On a new Ubuntu install, a user's PATH is: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games But in that same user's cron environment, it is: /usr/bin:/bin ...
6
votes
5answers
4k views

How to schedule a biweekly cronjob?

crontab(5) defines the following fields: field allowed values ----- -------------- minute 0-59 hour 0-23 day of month 1-31 ...
0
votes
2answers
134 views

Running a bash script via cronjob to restart a service

First of all. I don't know anything about bash scripting. second this is a very big problem on my side, and I don't have any idea what to do. Currently, I have this website. which was written in php. ...
-1
votes
1answer
24 views

Crontab / jobs failing (due to + sign?) [duplicate]

I'm trying to automate a nightly backup with the following cron jobs (IPs and password redacted. of course): [root@katexic ktxc]# crontab -l 30 3 * * * /bin/tar -czf /backup/ktxc/ktxc-`date ...
0
votes
1answer
41 views

cron not running specific command [duplicate]

I have a simple script and asking crontab to execute that script. In the script, I have 2 commands I want to run and append the output to a file. Only one of the commands does as it should. However, ...
6
votes
2answers
3k views

pptp (pon) fails when called via cron (debian)

I have a pptp VPN link dialing from my (debian) linux server here, to an ISA2003 server at a remote site. The internet connection at (both) ends is somewhat dodgy, so I have written a little script ...
0
votes
1answer
43 views

How to filter cron messages in syslog-ng

I have a litte problem. I dont know ho to filter cron jobs in syslog-ng. It's spamming my log. Jun 05 16:09:01 CRON: pam_unix(cron:session): session opened for user root by (uid=0) Jun 05 ...
0
votes
0answers
131 views

Rundeck - Remote command failed with exit status 1 on php remote command

I use Rundeck to launch symfony php command. I have this result at the end of the command : Remote command failed with exit status 1 Any idea ? my debug job log : [workflow] Begin execution: ...
0
votes
1answer
631 views

How to restart PHP-FPM from cron?

I'm trying to restart PHP5-FPM periodically using Cron, but am having no luck. I can restart manually with no problems, using service php5-fpm restart or /usr/sbin/service php5-fpm restart However, ...
0
votes
1answer
67 views

Server crashing daily at 3:40am

I have a cloud server with rackspace. It is CentOS release 5.10 (Final). 40GB storage, 1gb ram, 2gb swap. I am running the kloxo control panel to manage the virtual hosts. Every day it eats up all ...
0
votes
2answers
90 views

CentOS root user crontab for mysqldump

I am using CentOS 6.6. I am trying to set up a crontab. I made an .sh script which runs perfectly when executed manually. The command is following: mysqldump --skip-lock-tables --single-transaction ...
0
votes
1answer
196 views

run PHP file from shell script

I have never added a cron job and am not much use with shell either... My chosen cron directory is /etc/cron.daily/ all I need my script to do is run a php file daily. I would be nice if it ran at ...
0
votes
1answer
30 views

Command will run in shell but throws unexpected EOF error in cron [duplicate]

I am trying to run the following in cron to back up a server every morning at 4am: 0 4 * * * dump -0uan -f - / | gzip -2 | ssh -c blowfish user@server dd of=/backups/`hostname`_`date ...
3
votes
4answers
5k views

Synology cron job not working

I am not sure where to ask this question but I'll ask here first. I've got a Synology DS211 server and I am trying to run cron jobs but it is not working. This is the code I got in the crontab file ...
-2
votes
1answer
60 views

VPS Cron and other email going to spam folder [duplicate]

I have a new vps and I need to setup some cron jobs on it to notify me of what's happening on the server. I've tested with sendmail and emails are indeed leaving the server, but on my email they are ...
23
votes
7answers
13k views

Can I run a cron job more frequently than every minute?

Is it possible to run a cron job every 30 seconds without a sleep command?
-1
votes
2answers
608 views

Passing date/time to cron job command

Is there any possibility to pass current date/time to command in my cron job? E.g. I want to make sql dump every night and name the dump file like 'dump-yyyy-mm-dd.sql'.
0
votes
1answer
30 views

How to detect if a longer chain of commands in cron fails?

I want to create a crontab wrapper in python that logs if a crontab entry fails. It should be useable like this: 0 * * * * cronwrapper -c "some_command | some_other_command & third_command ...
1
vote
2answers
2k views

how to properly run a scrapy crawl from cron

How would I run a command like scrapy crawl empt.com in a cron job where I need to be in a specific folder to run the command for example: /downloads/my_crawler/empt/empt/ then the command scrapy ...
3
votes
3answers
35 views

Is it possible to determine if a job is being started as an at job (kicked off via atd/cron)?

Is there a way to identify a script is being run as an at job instead of interactively from the shell by a user? Some of our scripts have a guard to check if they're running in screen by checking ...
1
vote
3answers
60 views

Monitoring file for changes and immediately take action on change

How can I constantly monitor (small) file for changes? Eg. when file is updated (action from web application), a script is executed (if not already running). Right now, I do it every minute using ...
0
votes
2answers
757 views

Failover tmpfs mirroring. Am I doing it right?

My goal is to have a certain directory to be available as tmpfs. There will be some modifications during server uptime in this dir and those modifications must be synced to non-tmpfs persistent dir on ...
2
votes
3answers
444 views

cron job sending emails in a wrong charset

I have following command in a cronjob: */5 * * * * php /var/www/domain/yii rss/parse It outputs email in a wrong charset: Content-Type: text/plain; charset=ANSI_X3.4-1968 But when i launch that ...
0
votes
1answer
51 views

centos 6 64bit crond not running on startup?

I have two VPS from ramnode, centos 6 64bit. I have reinstalled server 2 several times and also tried 32 bit centos 6. Same problem. Whenever I type reboot and then service crond status it says ...
0
votes
1answer
97 views

How can I control a gradual file upload with cron or similar? [closed]

I have several terabytes of data I need to back up to S3/Glacier over a slow link. I want to upload from, say 9pm to 9am and resume from where it left off. Is there free software that would do that ...
2
votes
4answers
7k views

Running cron every 10 minutes

I have a python script on my desktop: /home/ceasor/Desktop/script.py In /etc/crontab, I wrote: 0 */2 * * * ceasor sudo python /home/ceasor/Desktop/script.py The python script is not ...
2
votes
2answers
63 views

how to stop cron mail receiving in spam folder?

I have added a cron job for my incremental backup, and I configured it like this.But my mail goes to spam folder.so iclick not spam option in mail.it moves to inbox.but again it receives in spam 0 23 ...
0
votes
0answers
40 views

cron job doesn't run under specific account

I have a crontab entry on my RHEL 5.4 system under the "oracle" account but it never seems to actually run. I have the following entry: * * * * * /home/oracle/blahblah.sh > /tmp/test.log ...
0
votes
1answer
38 views

Run cron jobs in different TZs

I have several cron events that need to run but on different timezones. For example, I have one event that runs every day at 08:30 UTC, and another event that runs every day at 09:30 CET. I've read ...
1
vote
3answers
282 views

How to send an e-mail after a cron job [duplicate]

I have added a cron job for my incremental backup, and I configured it like this: 0 23 * * * /usr/bin/rsync -ravzX /mnt/external/project/ /media/backup/project/ | mail -s "Backup Success" ...
29
votes
10answers
65k views

Running a cron job manually and immediately

(I have already read How can I test a new cron script ?.) I have a specific problem (cron job doesn't appear to run, or run properly), but the issue is general: I'd like to debug scripts that are ...
0
votes
1answer
59 views

Issues with Webalizer cron job throwing error due to file cannot open - how to Fix?

So I have a newly installed server running Ubuntu 14.04 with the default install of Sentora the free open source control panel. I did not make any customization to webalizer or cron. So I am unsure ...
1
vote
2answers
81 views

Privileged command as part of cronjob [duplicate]

I have a personal username/password on a unix machine with limited privileges. Whenever I need to execute some commands I have to substitute user using the su command, then I execute it normally. ...
2
votes
3answers
718 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 ...
1
vote
1answer
290 views

Root cron job can't read file from /root/

I've got a cron job in root's crontab defined like this: 0 1 * * * /usr/local/bin/tarsnap-backup-script > /tmp/tarsnapcron.txt 2> /tmp/tarsnapcron.err The script is a python script that ...