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

Reliably running background operations

I'm looking for a recommendation on how to reliably run background operations. I have many servers posting operation messages to AWS SQS, and I have another server which will run these CPU intensive ...
0
votes
1answer
27 views

Cron environment inconsistency [duplicate]

I've seen some inconsistencies between the cron environment and my environment. For example, I have installed paver (pip install paver) in my environment and calling paver works paver. Using paver in ...
1
vote
3answers
2k views

keeping a remote server up to date with git repo

So, I'm aware of git hooks, and will be looking into those next, but want to write a simple bash script, run via cron, to keep a repo on a remote server up to date. I imagine it working like this: ...
0
votes
1answer
535 views

Adding OpenVPN client connection to cron [duplicate]

I wrote simple server-client OpenVPN config files: server.conf dev tun0 ifconfig 10.8.0.1 10.8.0.2 client.conf dev tun0 ifconfig 10.8.0.2 10.8.0.1 remote 192.168.0.123 which basically is a ...
5
votes
3answers
1k views

Cron expression: difference between 0/1, 1/1 and *

In a cron expression, what is the difference between 0/1, 1/1 and * ?
1
vote
3answers
152 views

crontab cannot find script

I have a cron job that runs under my user once per night. I installed it using crontab -e and a by adding the line: 0 1 * * * /home/username/diskreport.sh The crontab is set up so that ...
2
votes
1answer
152 views

Disable mailing in cron globaly

The web is full of suggestions how to disable mailing in cron like asked here stop linux from emailing me cron errors?. Is there really no global config flag I can set to disable mailing in cron for ...
0
votes
2answers
47 views

How to automatically send email when process is using more than xxxMbit/s

I haven't found anything for that. How could I automatically send an email (via crontab) with the ID of the process, the user & finally what's the name of the process for example when this process ...
0
votes
1answer
86 views

Windows Scheduled tasks ends prematurely, so server doesn't run

I'm trying to run Django on my Windows Server 2008 machine. I can do this manually by calling python manage.py runserver 54321, which launches Django's server at http://127.0.0.1:54321 -- then I can ...
1
vote
0answers
180 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 ...
0
votes
1answer
462 views

Why is cron running twice?

I wanted to execute my PHP mailing-script automatically with cron. I always get the mail twice though. The script runs fine when started manually. I put this in the crontab for testing: 54 13 * * * ...
1
vote
1answer
152 views

Is it possible to make an individual daily cron run with UTC time while keeping the system localtime?

I have a cron script under /etc/cron.d as so: SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 0 0 * * * root /usr/local/sbin/app_logrotate >> ...
0
votes
1answer
712 views

Compress and remove logs from jboss on linux with cron

I need to compress and remove log files after some time from serwer. I have never write scripts before. So far i have script logs.sh: #!/bin/bash LOGS=/usr/local/jboss/server/default/log/ ...
3
votes
1answer
276 views

Wheezy processes die periodically

I have a very weird problem. Certain processes on my mail server, but not all, die periodically (every second month or so). A few of the process that die are: ssh dovecot postfix Processes that ...
2
votes
2answers
348 views

Exim - Force Messages to domain before retry time

We have exim running in queue-only fashion. The reason is that we are a bulk sender (a legitimate, double opt-in) and have experienced Yahoo and Hotmail throttling. The best practices state that once ...
1
vote
0answers
40 views

Won't keychain --clear in .bash_profile interfere with cron jobs?

Keychain tutorials recommend adding /usr/bin/keychain --clear to ~/.bash_profile to only allow cron jobs to use passwordless login. I'm not sure I understand how this works. If I take it right, the ...
-1
votes
2answers
35 views

Crons excluding specifc time ranges [duplicate]

I have many crons that run at different intervals. I need to configure them all to not run between two specific time ranges. How can I configure a unix cron to run exclusive of 11:45-13:00 and ...
1
vote
2answers
814 views

Linux Bash IF conditions not processing when running as crontab

So I've made myself a little script which monitors my served directories for any PHP files which have changed. It's designed to run every 5 mins from crontab and email me any changes so that I can ...
-1
votes
1answer
109 views

Crontab not executing [duplicate]

I'm running CentOS 6.2, trying to run tasks through cron. I've verified crond is running $ service crond status crond (pid 20553) is running... I have no /etc/cron.allow file, but I do have an ...
1
vote
1answer
194 views

Cron not running script [duplicate]

I have a script that works when called: /usr/local/bin/myscript #this works fine Permissions for the file are: -rwxr-xr-x 1 root root 155 Jan 27 09:34 myscript I've added a line to /etc/crontab: ...
0
votes
1answer
241 views

Change cron.daily run time on ubuntu

Am I correct in understanding that to update the time that a daily cron job runs (from /etc/cron.daily/), all I need to do is update the /etc/crontab file? Are there any risks I should be aware of ...
0
votes
2answers
729 views

Why unison does not run in cronjob?

I want two way data sync between two CentOS based servers, so I installed Unison on both of my CentOS servers. I made a script file on root which runs unison and works fine, and syncs the files, when ...
0
votes
2answers
84 views

Cronjob screen PHP does not executed [duplicate]

If I execute the following in the terminal it works: screen -dmS tt-rss-daemon sudo -u www-data /usr/bin/php /usr/share/nginx/www/tt-rss/update.php --feeds --daemon If I write the following in a ...
0
votes
3answers
1k views

Cron task error: WRONG FILE OWNER

I'm using the /etc/cron.d/ folder to store my cron tasks. These tasks are symlinks to my actual file which is kept under VCS. These files are owner by a user named "www-data". I've read that Cron will ...
1
vote
1answer
242 views

Issues with MySQL restart on running through a crontab scheduler

I have written a shell script which starts MySQL when its killed/terminated. I am running this shell script using a crontab. My cron looks for the script file named mysql.sh under /root/mysql.sh ...
1
vote
0answers
29 views

crontab not outputting to log when cronlocks removed on some files

I'm running a variety of crontab curl requests and I'm not sure why SOME of them stopped outputting the contents to log files. The only change I made was removing cronlocks from all of the entries ...
-1
votes
1answer
435 views

VPS debian 64 bits put cron to reboot at 7:00 every day

I have a VPS with debian 64bit. And I would like to set a daily reboot at 7:00 with $ ps aux root 1844 0.0 0.1 18832 964 ? Ss 07:23 0:00 /usr/sbin/cron so the cron it's ...
0
votes
2answers
115 views

how to prevent crontab logs from registring in syslog?

I have separate my crontab log into cron.log file by uncommenting the below ling in /etc/syslog.conf, But it register in syslog too. cron.* /var/log/cron.log How ...
-1
votes
1answer
390 views

Crontab is Not Running Crons [duplicate]

I have crontab setup on my CentOS VPS and it is not running... Here's the cron file: * * * * * php -f /var/zpanel/hostdata/zadmin/public_html/pingrglobe_com/crons/1min.php * * * * * php -f ...
2
votes
1answer
71 views

CRON job running but no sign of it in any file

This is an odd one and I know that the answer will be something simple that I have over looked... I have inherited responsibility for a Linux server running an old version of Ubuntu 10.04, it has a ...
1
vote
1answer
77 views

Script won't do what it should when run with cron

I've got some problem. I have script execution scheduled but when time comes nothing happens. #!/bin/sh TIME=`date +"%d-%m-%Y"` cd /var/www/flyer/data/www/ mysqldump -u root -ppasswd --databases ...
-3
votes
3answers
445 views

Mysterious automated emails

I remember messing around with crontab and setting up email capabilities on a server many months back, and now all of a sudden I'm getting the following email: EMAIL HEADER: from: root ...
1
vote
1answer
259 views

One-line backup, compress, scp database file

I support a company with a remotely hosted web site. They use PostgreSQL dbs. I can't write scripts on the remote server, and I don't want to store any backup files on the remote server, but I can ...
-1
votes
1answer
183 views

Restart crontab @reboot rule without actual reboot

I'm using crontab with a @reboot entry which starts a script containing a endless while-loop that is processing the output of a tail -F command. Is there any way to stop the currently running script ...
0
votes
1answer
318 views

Proxmox cron.daily log error

I am having a problem with cron.daily job in Proxmox. Its giving me this error: /etc/cron.daily/pve: Can't stat /var/log/pve/tasks/6: No such file or directory at /etc/cron.daily/pve line 78 The ...
1
vote
2answers
315 views

How does Cron interact with Kerberos for authentication?

I have a CentOS 6.4 machine which is set up with pam_ldap and pam_krb5. It is configured to use our Active Directory servers for authentication. I can SSH into the machine using AD accounts. I have ...
0
votes
1answer
89 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 ...
-1
votes
1answer
81 views

Configuring / Securing credentials required by batch job

I have a batch job which should run as cron job on a Linux server. This job requires some credentials to do it's work. Idealy I don't want to have that kind of credentials stored on my server, but ...
0
votes
1answer
80 views

cron to anacron migration process

I have a script that I want to run nightly on my lab's RHEL 5 and 6 workstations, so I'm deploying the script to each system's /etc/cron.daily/ directory and making it executable there. But some ...
0
votes
1answer
62 views

Why is cron using a different Ruby than my user and how to fix it?

I have a cron job that is a Ruby script. The problem is that the ruby executable is different than expected. Ruby was installed from source so it should be the new global default. $ ssh ...
0
votes
1answer
612 views

Cron won't use msmtp to send emails in case of failed cronjob

I'm trying to configure a machine so that it will send me an email if one of the cronjobs output something in case of an error. I'm using Debian Wheezy. Cron is working normally (without the email ...
2
votes
1answer
142 views

Why is cron mailing me program output even though I've redirected to /dev/null?

I'm trying to restart a system process through cron and getting emailed the startup output of the process. I thought redirecting STDOUT and SDTERR to /dev/null would "silence" the output but alas, ...
0
votes
0answers
41 views

need at jobs identified by name (advanced atd daemon)

Sometimes I'd like to delete or overwrite (or simply cat) an at job. Unfortunately, the at jobs are identified by a sequential number (file in /var/spool/cron/atjobs), which makes those operations ...
2
votes
2answers
534 views

Including file into crontab config?

I'm trying to put project specific crontab config into code repository to make it easy to update cron jobs on all backends when deploying. Is it possible to include files into crontab config? ...
1
vote
2answers
3k views

Centos backup mysql using cron job

According to this tutorial http://www.a2hosting.com/kb/getting-started-guide/backing-up-your-data/backups-on-dedicated-servers-and-vps trying to backup mysql database I did: 1) created folders in ...
4
votes
1answer
1k views

Crontab maximum command length

Is there a limit of characters a command in a crontab could be ? I have a crontab with a 178 characters command and it seems to be truncated at 164 when executed. I can tell this number from the ...
0
votes
1answer
240 views

Unable to get cron to append output from wget

I have a cronjob setup and running, but the logfile keeps getting overwritten every time it runs. I would like for the wget output to be appended each time the cron runs. Why is this and how do I fix ...
0
votes
1answer
312 views

(bsnmpd), uid 0: exited on signal 6 (core dumped) / Syntax error: word unexpected (expecting “then”)

I'm using FreeBSD 9.2-RELEASE: # uname -a FreeBSD f9.alexus.org 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC ...
4
votes
1answer
215 views

Why is crontab file periodically overwritten?

I have a Ubuntu 12.10 server with an nginx user that I use to edit a crontab file. Periodically (maybe once every few hours? it's hard to tell), I notice that edits I have made as the nginx user have ...
-1
votes
1answer
187 views

Understanding my Cronjob and the logs (Debian) [closed]

I'd like my cronjob to run every 5 minutes. It should execute a command which a user can only run from a certain directory. In my:/home/alias/laravel/ directory, I can manually run (as user alias) ...