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)

0
votes
0answers
5 views

pppd call to restart VPN ineffectual from a CRON

This works when I run it directly but never from a cron it is the 'pppd call OM01' which seems to be ineffectual when run from a cron. #!/bin/bash # vpnTest.sh test if you ping via the VPN # if ping ...
0
votes
2answers
38 views

What mailer does cron use to send mail?

I am trying to debug an issue with cron not sending mail on a Centos 6 box that I did not configure. How can I determine which mailer cron is using to send mail? The crontab man page has this to say, ...
0
votes
0answers
27 views

Cron bash script skips second do/done set

I have a script that checks IPs for ping reply then tries to run an snmpwalk on them. I am trying to schedule the script to run weekly in cron. When I run the script in the shell, it runs perfectly. ...
0
votes
0answers
8 views

cron vs anacron on server machine (AWS instance)

During review of environment which I took over I've discovered that Amazon Linux uses anacron by default which means that cron.weekly jobs are executed somewhere between 3a.m. and 10p.m. Moreover - ...
0
votes
1answer
12 views

Daily postgresql cron error log file

I am getting these emails daily: /etc/cron.daily/logrotate: error: error accessing /var/log/postgresql: No such file or directory error: postgresql-common:1 glob failed for /var/log/postgresql/.log ...
-1
votes
0answers
34 views

Not a directory: /etc/cron.hourly

I'm getting cron emails "Not a directory: /etc/cron.hourly" in every 52 minutes, /etc/crontab entry is given below, SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ #run-parts 51 ...
0
votes
1answer
21 views

Sending cron output as a text file attachment

I sysadmin a multiplayer game at CentOS 6.5 Linux server for a customer. The customer has requested me to send the daily chat logs (to identify and ban agressive players) - as a text file ...
0
votes
1answer
42 views

Cronjob for a bash script pauses for 2 minutes randomly

I have been running a bash script on CEntOS 5.5 machine that checks replication on a remote mysql server. The script creates a temporary lock file and is scheduled to run in Crontab every minute. But ...
-1
votes
1answer
15 views

some services switched off automatically

with my company we have a VPS. We have some issues with it. this morning the pure-ftpd was stopped. I had to start also postfix and the cron jobs were off for 3 hours. My config : Debian GNU/Linux 7 ...
2
votes
1answer
58 views

Should I use cron.hourly or crontab?

It seems that all the suggestions for using/scheduling awstats is via crontab, as such: 0 * * * * /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=mysite -update >/dev/null (running awstats ...
0
votes
1answer
34 views

zip in cron doesn't work, but zip from command is working [duplicate]

I need to back up a directory with zip -r /savehere/backup_`date +%y%m%d%H%M%S` /save/this -q It works fine. But not from crontab: * * * * zip -r /savehere/backup_`date +%y%m%d%H%M%S` /save/this ...
0
votes
2answers
26 views

crontab fails, cannot find aws executable

I am trying to run a backup script on my ec2 amazon server (ubuntu 14.04), to automatically create a snapshot of amazon ebs volumes. Therefore I am using the aws-missing-tools script: ...
0
votes
1answer
34 views

simple crontab every 5min not working [duplicate]

I am trying to setup a crontab to execute a command from a specific user. Here is my code in "crontab -e". Why is this not working ? */5 * * * * user /home/user/whoami>swag.txt I am running ...
0
votes
0answers
36 views

alternatives, sudo and crontab problems [migrated]

On an Ubuntu 12.04 machine I've used the alternatives system to set the editor to vim.basic. I get the correct editor when root but not when I sudo to root and run crontab, and I'm trying to ...
-5
votes
3answers
49 views

Crontab is not working [closed]

I am trying to add a new script to crontab using putty. I am following these steps: open putty enter my username / password enter command crontab -e to create new crontab copying this command to ...
2
votes
1answer
83 views

Have a Vagrant VM destroy itself or power off on completion of a long-running task

I've been using Vagrant with Ansible to perform certain ETL tasks. This has provided some flexibility and transparency: jobs can be easily be moved around and the YAML playbook provides some level of ...
-1
votes
0answers
17 views

trigger an email when some user edit crontab in the PC

Is there any way to trigger an email when some user edit crontab in the PC ? i.e my crontab contains several cron jobs which scheduled to run daily. i need to trigger an email when some one add or ...
0
votes
2answers
70 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: ...
-2
votes
2answers
64 views

Cron not launching python script

Python script is not being run, all other functions are running and stand alone script runs but combined... nada. Initially it was */30 * * * * screen python ~/db_preset.py (Yes there was new line ...
-1
votes
1answer
12 views

issues with cron file in cron.d

running amazon ami (similar to centos.) this is what I found on cron file under /var/log : Sep 4 15:32:01 mike crond[2289]: (root) BAD FILE MODE (/etc/cron.d/mytasks) and this is my file mytasks ...
-2
votes
3answers
80 views

crontab job is setting date wrongly [duplicate]

I need to set date and time in my server in order to make them synced always. I cannot use ntp inside my channel due to proxy issues. I've found this workaround. It works fine when I run it in command ...
0
votes
2answers
62 views

cron ignores changes to /etc/crontab

I'm seeing strange cron behavior which I'm not sure how to debug and fix. It ignores changes to /etc/crontab until restarted, e.g. I edit /etc/crontab adding * * * * * root echo 'weee' > ...
1
vote
1answer
34 views

crontab truncates file path

I try to run the following command: crontab -u root /root/iss/current/node/bin/installers/nl_brandless_selector_full_hd/nl_brandless_selector_full_hd_cron_file But I got an error like this: ...
-4
votes
3answers
53 views

cronjob or similar to open a local php file including query [closed]

How do I open the following file with cronjob correctly every 5 minutes: /var/www/mysite/folder/foo.php?query=1 I tried myself but i just did not get it working... i tried with /usr/share/php5 , ...
0
votes
1answer
70 views

cron.daily not running at the time it should?

My /etc/cron.daily scripts seem to be executing far later from what I understand they should. I am in Ubuntu and anacron is installed. If I do a sudo cat /var/log/syslog | grep cron I get something ...
1
vote
2answers
41 views

Kill all currently running cron jobs

For some reason my cron job scripts aren't exiting cleanly and they're backing up my server. There are currently a couple hundred processes running for one of my users. I can use the following command ...
-2
votes
1answer
51 views

Crontab not working to send email [closed]

I have CentOs 6.5 running on a VPS Host. I installed crontab and email using the below commands yum install vixie-cron service start crond chkconfig crond --levels 235 on yum install sendmail ...
-1
votes
3answers
278 views

Non-root user is not allowed to use crontab due to PAM restrictions [on hold]

I have the issue that I am not able to use cron with my normal user ( other than root ) [coins@COINS-TEST ~]$ crontab -l Authentication service cannot retrieve authentication info You (coins) are ...
0
votes
0answers
18 views

Cron sends error email every 24 hours

I receive the following email from cron every 24 hours. Header: Cron <example@box500> ~/public_html/admin/backup-from-cron.php 2>&1 > /dev/null Body: /bin/sh: ...
0
votes
0answers
22 views

Crond stopped sending e-mails for no apparent reason [duplicate]

I have a cron job that I want to run just once a day (executes a rake task), but while I'm testing it I have it set to run every 5 minutes. It was running perfectly fine this morning and sending me ...
3
votes
1answer
69 views

crontab listing or editing results in fopen: permission denied

Recently, a job configured to run from a user's crontab stopped executing. When attempting to list or edit the crontab for the user, the result is: user@host:~$ crontab -l crontabs/user/: fopen: ...
0
votes
1answer
25 views

Spam emails from Suse server: test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp

Have a virtual server with old Suse. About a month ago cron started spamming me with emails like this: Subject: test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp ...
0
votes
1answer
62 views

Problems with a PHP include from the command line (or cronjob) [closed]

I am trying to setup a cronjob on my AWS EC2 instance. There is nothing wrong with the actual entry in the crontab file but when I try to run the command in the command line I get this response. PHP ...
0
votes
1answer
69 views

Why does this command to send emails work from the shell but not as a cron job?

I have a problem with cron jobs, I need to send email notification to users, I use this command curl "http://example.com/index.php?option=com_community&task=cron">/dev/null 2>&1 When ...
0
votes
1answer
24 views

Starting a detached screen has no effect

I want to start a shell script in detached mode on ubuntu bootup (via cronjob @reboot) but it doesn't even work when I try it directly. Syntax: screen -d -m -S myscreenname /path/to/my/script.sh ...
0
votes
1answer
88 views

MySQL: Error establishing a database connection

I'm running a DigitalOcean.com Virtual Server with the typical Ubuntu LAMP Stack for a few WordPress sites. Of course, every week or two the MySQL service seems to crash. If I restart MySQL or the ...
0
votes
1answer
75 views

How to make sure script is always running?

I have 4 scripts in crontab that start on server boot. After 12 hours or so, some throw an exception and stop running. At that point, I want my server to just start the script again, so each script is ...
0
votes
0answers
75 views

ssmtp won't send cron email

I can't figure out why cron on my AWS EC2 (Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-32-generic x86_64)) can't seem to send email out via sSmtp to AWS SES. This works: echo "test" | ssmtp my@myemail.com ...
0
votes
1answer
39 views

Where does cron store the real-time stderr logs?

I've got a cron job configured to run a command like some-command 2>&1 >/dev/null | tee -a /tmp/some-command.STDERR.$(date +\%Y-\%m-\%d.\%H.\%M) I've also got a tmpreaper cron job that ...
0
votes
1answer
94 views

Python script succeeds manually but fails on crontab

So I'm currently trying to get a script working but it's behaving differently when I run it manually than when I run it from crontab. Basically, I have a reverse ssh tunnel set up from one server to ...
0
votes
1answer
107 views

run multiple instance of same php script from bash

I am running a cron job to execute a php file multiple times per minute like this * * * * * /usr/bin/php /var/www/html/myFile.php >> /var/www/html/cronlog 2> /dev/null * * * * * ...
-3
votes
1answer
52 views

my crontab doesn't send mails anymore

Before saturday, mailing after crontab executions were working but from now on, it doesn't work at all, but the config didn't changed. Operating system : Debian 7.5 I tried using PHP the mail ...
1
vote
1answer
21 views

Is 6,10-12 valid syntax fo the hour part of a cron task? [duplicate]

I know that "10-12" is a valid range for the hour part of chron and that "6,7,8" is avlid syntax too. Can I combine these 2 an us "6,10-12" if valid hours time is at 6 and between 10 and 12?
0
votes
0answers
33 views

How to make permission of mysql log file stick?

I am running a custom cron script to do log rotation and email newly compressed log files. Due to permission problems, I have to set the group user to root instead of the default mysql so that the ...
0
votes
1answer
260 views

Can't run AWS CLI from CRON (credentials)

Trying to run a simple AWS CLI backup script. It loops through lines in an include file, backs those paths up to S3, and dumps output to a log file. When I run this command directly, it runs without ...
0
votes
1answer
45 views

How can I know which user has cron jobs configured on a machine with 200+ users?

I need to build a new machine and copy properties and some cron jobs from another machine which has about 200+ users and I don't know which users have cron jobs configured. Is there a way to extract ...
1
vote
1answer
91 views

Perl FTP script fails from crontab, works from cmd

We have a Perl script we've been using (launched from crontab) for several years to upload images using Net::FTP. Recently we began to notice problems where the images were not uploading and errors ...
1
vote
0answers
118 views

cron.weekly runs on wrong day of week on Ubuntu

I have this line in my /etc/crontab: 47 6 * * Sat root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) So the cron.weekly should be started every Saturday ...
0
votes
1answer
48 views

Binding timestamp value to a variable in crontab

I'm basically trying to declare a variable with a date() value in crontab as I will constantly be using the same date structure over and over, here is what my crontab looks like so far. php = ...
-1
votes
1answer
147 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 ...