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
68 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
373 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
222 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
155 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
266 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
275 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
71 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
72 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
529 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
133 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
338 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
2k 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 ...
2
votes
1answer
888 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
181 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
302 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
187 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
163 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) ...
-2
votes
1answer
150 views

CentOS 6.3: logrotate and btmp

I had to configure logrotate on a server configured by other system-network administration. First of all I detected that there is no crond, so I had to install sudo yum install vixie-cron. All other ...
-1
votes
2answers
142 views

running a cron job on a time interval [duplicate]

Is it possible to run a job for 2 hours at a specific time? So lets say I want to run wget command that calls/hits an endpoint in my web app for 2 consecutive hours in a day. Meaning that every single ...
0
votes
1answer
44 views

Include executed cron command when outputting to log

Is there a way I can include the command that was executed in the output when I'm logging to a file? For example: * * * * * date && /path/to/php /path/to/script.php >> cron.log ...
1
vote
1answer
31 views

Cron: where is the /etc/cron.d defined? Is it possible to add a new directory?

In CentOS, where is the /etc/cron.d folder defined? Is it possible to add a new folder that works exactly as it? Example: I have another folder ( /mnt/software/cron ) full of files with the exact ...
1
vote
1answer
120 views

dhclient asking for new routing every 1500 seconds, removing my static routing, cron not working

I have a problem with cron job on my ubuntu server 12.04. I have two internet providers - one for fast speed, second - for local resources. So, I'm using command route to up the static routing for ...
1
vote
3answers
2k views

How can I run a Cron job to make backups of a MySQL server by SSH

I have a production server running CentOS with a MySQL database. At home, I have a QNAP NAS (runs a little embed linux). I want to make a Cron job on my NAS to backup the data from my CentOS ...
0
votes
1answer
75 views

Crontab issue with specific days execution

We have a cron job under a specific user's crontab which should be running only on working week days. Job was running all days before we changed it. After we changed in the following line the days ...
-1
votes
2answers
149 views

Not sure how to set up cronjob properly to run php function

Im not sure on how I should do to set up a cronjob to run a php function for my website, and doing so by using a URL. I dont want any output etc, I just want the cronjob to run the php function buy ...
0
votes
0answers
57 views

Incrond - event after all files have been copied

We are using incrond to monitor network storage and sending mail when something new is appearing. The problem is, that event registered as: /home/storage IN_CREATE python ...
0
votes
1answer
94 views

Can't stop LAMP graceful restart

I just got my first LAMP up and running, everything works fine except that my server is restarting itself every sunday. When I read the logs I see "Graceful restart requested, doing restart" Should ...
4
votes
2answers
2k views

Setting timeout for cron jobs

Do Ubuntu Linux cron (Vixie cron?) support setting timeout for its jobs? Specifically, the process would be killed after X seconds unless it finishes successfully by then. I have had some cases ...
-1
votes
3answers
439 views

Are Linux cron Jobs each executed sequentially or in parallel?

Lets say I create two cron jobs: Cron Job A, runs every day at 8:00AM Cron Job B, runs every day at 8:05AM However, Cron Job A, takes 12 hours to run (don't ask why, this is an example). Will ...
0
votes
1answer
427 views

Why won't this shutdown shell script work under root's crontab when the guest user is logged in? [closed]

I've got a laptop running Lubuntu 13.04 and guest account enabled. People forget to shut it down every day so I figured I'd just put a one line script into root's cron to solve that. No dice. It shows ...
0
votes
1answer
361 views

cron.hourly script executing multiple times

The setup I have a script /etc/cron.hourly/msm-hourly that contains this: #!/bin/sh LOGPATH='/opt/msm/servers/cronscripts' LOGFILE="$LOGPATH/msm-start.log" # Make restart dead servers echo "" ...
1
vote
1answer
456 views

Crons not working on ISPConfig3

I have a CentOS LEMP stack with ISPConfig3. Everything is working perfectly, except for the cron jobs. I have tested the commands from command line, and they seem to be working fine, but when I put ...
-1
votes
1answer
285 views

How can I check cron task it's running? [duplicate]

I put a cron script in /etc/cron.d: [root@node ~]# cat /etc/cron.d/reconfig 0 */6 * * * root /root/bin/reconfig.pl But I get no list of cron tasks for root: [root@node ~]# crontab -l no crontab ...
2
votes
1answer
45 views

Aggregating emails from cron and cfengine

I've recently taken over administration of a decent size network (900 FreeBSD or Linux hosts across 10 physical sites) where we get a lot of email destined for root, mostly from cfengine (v2). We've ...
0
votes
1answer
201 views

cron job not running the script that start vncserver

Hi I wrote a script to start my vncserver when I call it manually via command line. It works as follows: the script is in usr/bin I gave it the right authorization (chmod u+x startvnc) but wen I ...
0
votes
3answers
154 views

script bash can't get difference in $PS1 or $- when running interactivelly or via cron

I want my cron scripts being executed verbosly when run interactively by a system user (for debug purpose for instance) and quietly otherwise (for cron, as I want receive e-mail if and only if I get ...
1
vote
2answers
290 views

crontab failing to start service via working script

My script works when ran by itself but not via crontab Crontab [root@someserver:/]# crontab -l SHELL=/bin/bash ...
4
votes
1answer
3k views

What cron job is /usr/lib/sa/sa1

I have logwatch enabled for my machine. Suddenly I see this line in my logwatch /usr/lib64/sa/sa1 1 1 : 4297 times /usr/lib64/sa/sa2 -A : 29 times run-part /etc/cron.hourly : 716 I tried crontab -e ...
1
vote
2answers
62 views

Is there a way to source cron jobs from a file

One of our servers has around 20-25 different cron jobs scheduled on it. Usually, we periodically check-in the cron jobs to a file in the repo using crontab -l > cron.jobs While bringing up a new ...
0
votes
2answers
46 views

Can I combine Cron special string “@reboot” with regular scheduling?

In the Cron manpage it mentions the special string "@reboot". Can I combine this with a regular schedule? The goal is simply to schedule a job to run once a day AND immediately in the event of a ...
1
vote
1answer
500 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
314 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
108 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
795 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
2answers
2k 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
115 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
317 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
161 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 ...