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
0answers
26 views

Anacron fails to open folder cron.daily

Recently I switched from user-specific anacrontab ( using -t ) to the global-one. Now each day anacron drops me a message (email to root) that it failed to open the cron.daily folder: Subject: ...
0
votes
0answers
27 views

Scheduled Cron Jobs auto Deleted after few days

i am using CentOS Linux 7.1 with control panel webmin virtualmin and now after upgrade webmin i am facing a problem with my crontab and the problem is which cronjob i have made by me these all are ...
-1
votes
1answer
29 views

env not working in FreeBSD cronjob [duplicate]

On my FreeBSD server, I have setup a cron script for backups using Duplicity. This script is as follows: #!/bin/sh export PASSPHRASE= export FTP_PASSWORD= keyid= remote= excludelist= ...
0
votes
1answer
81 views

cronjob error “/bin/sh: /path/to/file: No such file or directory” [duplicate]

i've installed a python software that allows to run javascript on the server i've put the binary file (jsrunner) in this address /usr/local/bin/jsrunner so in the ssh when i try it it works fine ...
0
votes
0answers
22 views

Yum-cron output to both email and log

When configuring yum-cron on a CentOS (07 x64) host, i noticed the following option (/etc/yum/yum-cron.conf) - # How to send messages. Valid options are stdio and email. If # emit_via includes ...
-1
votes
1answer
34 views

Cronjob doesn't run. Similar cronjob does run. Issue with Env Vars??? Fedora involved. psql involved [duplicate]

I have cronjobs like so * * * * * /usr/bin/psql -U usename dbname -c "select usename, now(), pg_terminate_backend(pid) from pg_stat_activity where state like 'idle%' and (now() - query_start) > ...
3
votes
2answers
50 views

Ran chkconfig but crond not starting on reboot on Amazon Linux

I am trying to get the cron daemon to start on reboot on an instance of Amazon Linux (Linux version 3.14.57-34.46.amzn1.x86_64). I have run: $ sudo chkconfig crond on If I run: $ chkconfig --list ...
10
votes
2answers
3k 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 ...
1
vote
3answers
44 views

Cronjob: E-Mail with Cronjob output from mailutils is empty

I am tempering with my cronjobs to change the sender and subject for emails sent by the cronjob. For sending emails I installed the mailutils package on Ubuntu 14.04. This is how I am sending my ...
0
votes
0answers
141 views

Cannot allocate memory problems - update-notifier-common

I'm running a Ubuntu 14.04.3 server on a Digitalocean droplet with 1GB RAM. I'm getting weird memory allocation errors, even though I have plenty of memory available. I started noticing this from the ...
-5
votes
1answer
38 views

cron - How many times the cron job will run when given aterisk(*) on all positions [duplicate]

If we define a cron job with * * * * * /some/task/to/perform, how many times the job will executed in 60 seconds?
15
votes
10answers
16k views

Techniques to Monitor cron tasks?

Are there good techniques for monitoring cron tasks over a cluster? We're starting to use cron to launch tasks at daily intervals. A few ideas for checking out information: Add special application ...
0
votes
0answers
34 views

nginx stop logging after crontab modified the log file

I have a web server(django) running on nginx + gunicorn. nginx writes its regular logs to: ~/myproject/log/access.log and it writes errors to: ~/myproject/log/error.log it works pretty well for ...
-2
votes
1answer
27 views

What is the “cluster” cron job?

I understand that cron job is some task running automatically on unix-like OS. My server is ubuntu14.04 with webmin installed. I was trying to setup a cron job through webmin, there is this "cluster ...
7
votes
2answers
387 views

Why does `crontab -` remove crontab, and can it be cancelled?

I hurried and forgot the e in crontab -e before I hit Enter. A prompt appeared, so I closed with Ctrl+D, same as I usually exit input prompts. Now, without warning, my entire crontab is empty. ...
0
votes
0answers
28 views

Crontab by hostname

My system is having 3 nodes and the cron scheduling is defined in one of these 3 nodes. So while checking with crontab -l at times I am getting proper cron listings at times I am not as the node ...
0
votes
1answer
243 views

cron and lftp issue

I have the following scripts running on raspbian. start #!/bin/bash /root/config/commands 2>&1 > /root/log/$HOSTNAME.log commands #!/bin/bash source /root/config/variables echo TestLine ...
0
votes
1answer
50 views

Debian: How to lock root account AND still use cron. (cron does not work while locked account :( )

I'm setting up a small private server which is connected to internet. For security reasons I would like to lock my root account after setting everything up and then use a sudo user for further ...
1
vote
1answer
1k views

sending email from cron in html format not text

i am trying to send email every 1 hour from cron job which is executing a php script that fetches data from database and shows in a table format. i have CentOs 6.1 where i created my cron job.firstly ...
0
votes
1answer
34 views

MySQL Backup Cron Job

I have a cron job which backup up my MySQL database by exporting it. The script includes the root password to get the job done. I get the message: Using a password on the command line interface can ...
0
votes
2answers
56 views

$0 empty in script when run by cronjob [duplicate]

I am trying to setup automated backups for an AWS EBS volume and using https://github.com/colinbjohnson/aws-missing-tools/tree/master/ec2-automate-backup to do so. The backup script used is the ...
3
votes
1answer
595 views

Cron Daemon Wget blocked

I've got nginx on Debian 7 without cpanel. I am seting-up my Crontab like this: */45 * * * * wget "http://example.com/cron-url.php" >/dev/null 2>&1 The above cron is being blocked with ...
1
vote
0answers
15 views

How to change $PATH for crontab in Opensuse [duplicate]

I have a script written which works perfect on terminal however gives error when called through crontab. It took me a while that the problem is with the cron environment not my script. so I tried ...
100
votes
4answers
129k views

Why is my crontab not working, and how can I troubleshoot it?

This is a Canonical Question about using cron & crontab. The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below. This addresses the cron system with ...
43
votes
7answers
27k views

Prevent duplicate cron jobs running

I have scheduled a cron job to run every minute but sometimes the script takes more than a minute to finish and I don't want the jobs to start "stacking up" over each other. I guess this is a ...
1
vote
1answer
39 views

IPSec Tunnel goes down during long periods of inactivity

I have 2 AWS regions I have connected using an OpenSWAN IPSec tunnel. This works great in our production environment but in our test environment where 1 of the regions has long periods of inactivity, ...
3
votes
3answers
339 views

Cron appears to run but doesn't execute in the same way as when run manually from the terminal [duplicate]

I have a php script that connects to an external API returns some data and updates a database table. I can run this directly via my command line / SSH terminal and it works fine (takes about 5 minutes ...
15
votes
7answers
8k views

Robustly disabling specific cron.{hourly,daily,weekly} script

On various systems that I administer, there are cron scripts that get run via the commonly-used /etc/cron.{hourly,daily,weekly} layout. What I want to know is whether there's any common 'disable this ...
-1
votes
1answer
49 views

bash scripts work fine when I run it from command line but not from cron [duplicate]

I have this bash script in runtests.sh file #!/bin/bash cd /Library/WebServer/Documents/protractor_clipboards protractor testscript.js When I do this on terminal ./runtests.sh But when I try to ...
2
votes
2answers
83 views

nginx logs just failed weekly rotate, how do I determine why?

After I installed nginx, its logs have been rotating weekly as per a weekly cron job on Sunday 00:00 However this week the logs failed to rotate, and I can't figure out why. The only thing I can ...
0
votes
2answers
1k views

Inside Docker container - crond running but no cronjobs executed

I have built a container from a Dockerfile, based on an Archlinux base image. Using a "RUN" command I have installed "cronie", since Arch does not come with any form of cron. Now, after the container ...
1
vote
1answer
81 views

Cron jobs not working anymore

Cron jobs were working for months in the past but recently I had a high server load and now cron jobs aren't executing my php files (the same ones that were working before). When I check the cron log ...
0
votes
1answer
53 views

Error in crontab - bad minute

could anyone give me a clue what am I doing wrong in the crontab below? I'm getting bad minute error... Here the entries: 0,15,30,45 * * * * /usr/sbin/netdate -v time.server.com > /dev/null ...
0
votes
1answer
71 views

Running cron job manually and immediately with PHP

I just wanted to run all my cronjob manually and immediately, following command works well in command line terminal but not working with shell_exec crontab -l | grep -v '^#' | cut -f 6- -d ' ' | ...
0
votes
2answers
827 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 ...
0
votes
1answer
22 views

When triggered, run script at top of the hour

I have a service that must be started at the top of the hour, any hour. Whenever that service goes down (during a reboot, etc) PRTG Network Monitor will know. PRTG has the ability to run a script when ...
3
votes
3answers
809 views

Is it possible to assign a nice and ionice priority to all scripts executed by cron daemon?

To be a bit more concrete: I have a Debian Squeeze Linux machine with a web application that should become available all over the planet. Until now I had a bunch of resource consuming cronjobs each ...
0
votes
1answer
26 views

Run every 10 minute but start from 5

I want to run my code each 10 min, I want do it with */10 * * * * ceasor sudo python /home/ceasor/Desktop/script.py but I want it start from 5 instead of 0, I mean want it run on 5,15,25,35,45,55 ...
6
votes
3answers
174 views

cron job timing

I would like to start cron job at 9:30 and then work every 5 minutes and then stop at 16:30 everday. Is this kind of scheduling possible in one or do I need two cron jobs?
6
votes
2answers
13k views

how to run cron job every 3 months?

What would be the crontab entry look like for a job that runs on the first day of every third month?
1
vote
1answer
113 views

Logrotate running according to cron, but logs are not rotated

I run logrotate through cron with the script [alex@leia ~]$ cat /etc/cron.daily/logrotate #!/bin/sh /usr/sbin/logrotate /etc/logrotate.conf >/dev/null EXITVALUE=$? if [ $EXITVALUE != 0 ]; then ...
3
votes
1answer
1k views

Jenkins/Hudson Can we monitor realtime result of external job from Console output?

I have some external jobs need to be monitoring from central Jenkins/Hudson server. Jenkins/Hudson just send job output after it finish. Some jobs run in very long time and we aren't sure it is ...
0
votes
1answer
135 views

Linux(redhat);Crontab; bash - script working from shell but not in Crontab - assigning command to variable fails

I know that my question was asked several times, but there is no solution for my problem. In my Company there is an Application running on a RedHat Mashine. Users connect a text Based GUI via ssh to ...
0
votes
2answers
183 views

using flock with cron

I need to prevent a script from being executed multiple times simultaneously and so flock seems right up my street. What I can't figure out is if I need to manually delete the lock file after the ...
1
vote
2answers
1k 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 ...
0
votes
1answer
52 views

php script from sh from crontab die with no traces

in my crontab there is a script starting at 2:40 AM, executing some routines both from sh commands and php scripts starting from sh files. the line in crontab looks like this: SHELL=/BIN/BASH ...
0
votes
1answer
31 views

CronD ignoring command and running hourly

Having a problem with Cron on Centos7 it appears to be running my command 5 * * * * root curl http://www.(removed)/Ebay/GetOrders.php every hour instead of the 5 minutes i set some of the log: ...
1
vote
2answers
74 views

Crontab command not executed

Coming from Why is my crontab not working, and how can I troubleshoot it? i still don`t know why my command is not executed. I got same command for root and www-data and my cron logs shows that ...
15
votes
4answers
14k views

Is there a way to validate /etc/crontab’s format?

I prefer to stick scheduled tasks in /etc/crontab so I can see at a glance what's scheduled to run, regardless of which user the task runs as. The only gotcha is that the format isn't validated on ...
2
votes
2answers
142 views

Getting regular crons to stop for one hour a day - is there a better way?

I have a cron job that needs to run every 10 minutes, but should not be run for an hour each night ( from 5 to 6am ) while the system is down for a backup. As I understand it the following syntax ...