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
2answers
57 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' > ...
0
votes
1answer
27 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
39 views

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

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
29 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 ...
0
votes
0answers
17 views

does wordpress auto update work without a cron job? [migrated]

I'm a bit on a loss here. Since WP 3.7 you can update your wordpress automatically. Since then it's more hit and miss on several servers here. I would like to understand, if it is enough to enable ...
1
vote
2answers
27 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 ...
-1
votes
0answers
20 views

Using git with cron [closed]

I'm not looking for a solution - mostly for an opinion. But if there is alternative/better solutions I will gladly hear them) My use case: small server, not too many people working on separate ...
-2
votes
0answers
24 views

aws s3 works with script but not on cron [closed]

guys.. My first post ! hope not the last .. I have few bunch of servers on aws ec2 platforms. I made a simple script to backup my custom logs on their s3 storage bucket. The problem is the script ...
-2
votes
1answer
29 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 ...
-2
votes
0answers
30 views

crontab error with (No MTA installed) but I use >/dev/null 2>&1 [duplicate]

I'm new on linux user I try to run crontab to backup my database with vagrant user * * * * * /usr/bin/mysqldump -h localhost -u root -p root mydb | gzip > /var/backup/all/database_`date ...
0
votes
2answers
55 views

Non-root user is not allowed to use crontab due to PAM restrictions

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
15 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: ...
1
vote
0answers
19 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
43 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
18 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
37 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 ...
-1
votes
0answers
41 views

Cron job not being executed fully [duplicate]

I've created a small line that should pull some data from git every hour, unfortunately, it's not being executed fully. My command looks like this: cd /var/repo && git pull origin release ...
0
votes
1answer
58 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
22 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
65 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
61 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
31 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
0answers
18 views

Run Cron job at 15,30,45,0 mins in a hour [duplicate]

I want to express the cron config with only the increment value in minutes, in example: if I need set a job for running every "15 mins in a hour", I mean at minutes 15,30,45,0 of every hour, how can I ...
0
votes
1answer
34 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
47 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
61 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
40 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
24 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
104 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
43 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
67 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
57 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
44 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
82 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
0answers
61 views

Is it better to use the systemd service unit's Restart & RestartSec, or use a systemd timer unit?

I have a couple of in-house automated scripts running at periodic intervals. One is every five minutes, the other is every minute. They don't really need to be ran on-the-dot; e.g. I don't care if ...
1
vote
1answer
61 views

When cron is completed How to get email notification and log in a file (both)

I am a Newbie to linux. I'm trying to figure out things. Can someone kindly help me how to combine these two commands? (1) Normally cron can results can be directed to a log file by editing crontab ...
0
votes
2answers
94 views

Backup Ubuntu server with cron/rsync: Problems with resuming large files

I currently have a dedicated Ubuntu backup server which wakes itself up from suspend (using rtcwake) daily. 5 minutes later a cron BASH job kicks in, using rsync to pull files from various network ...
0
votes
1answer
57 views

Periodically run an MS SQL query on multiple sites

I have been tasked with pushing Google Analytics data periodically to SQL Server 2005 running on a different server from various websites (about 450 of them) grouped on various servers. I understand I ...
1
vote
4answers
105 views

rsync changing already existing files

I have a simple line of rsync in my crontab that gets backup files from the prod server to another. It looks like it is touching the already existing files in the destination folder. This way, the ...
1
vote
1answer
99 views

Weird syslog order

Have you ever seen wrong order in /var/log/syslog ? I think that it causes only crontab. Jun 28 22:20:01 alex CRON[2327]: (root) CMD (something > /dev/null) Jun 28 22:21:01 alex CRON[2700]: (root) ...
1
vote
3answers
101 views

Server incremental backup to AWS Glacier

I'm looking to backup various directories and files from a Linux server to AWS Glacier. I'm trying to work out the details on how to do manage this. Incremental Backups I want to upload files ...
0
votes
2answers
42 views

rsync last 3 days plus weekly backups

I have a shell script that i'll be running with a crontab. Basically I want to modify this so I can do daily backups for the last 3 days. I've seen examples where the last 7 days are backup. I just ...
1
vote
1answer
25 views

Cron: possibility to specify a hours to start/stop on a specific day

What is the crontab syntax for specifying running hours/minutes based on the day of the week in a single entry? There's a task which needs to be executed every /1 minute from Monday,01:00 to ...
0
votes
1answer
30 views

Ubuntu 10.04 cronjob with curl dosen't work

I would like to execute some php script via cron job i have curl, crontab installed, but the cron job dosen't run/create any log file. crontab -l * * * * * curl ...
0
votes
2answers
140 views

munin-cron Unable to Copy Contents

I recently installed munin on my (Fedora12 based) server. Now, I wanted to get all the graphs in a static directory (The application runs on Django). So, I edited the file /etc/munin/munin.conf by ...
0
votes
1answer
47 views

can I use @reboot in cron.d files? [closed]

I want to run a job with cron on reboot as a particular user. I have been able to do this successfully using crontab to write to /var/spool/cron/crontabs/username with something like: @reboot ...
0
votes
1answer
112 views

ways to automatically fix line endings in shell scripts or files who break with ^M

Problem We regularly break our files lines endings and things stop working without us noticing. Bash complains about "invalid option" or ": command not found" as described here: ...
0
votes
1answer
99 views

Why does my cron job sometimes fail on wget: unable to resolve host address [closed]

My cron job runinng properly .But sometimes it get fail with following error message" failed: No address associated with hostname. wget: unable to resolve host address "
0
votes
0answers
9 views

Setup cronjob with SSH crontab [duplicate]

Someone can help me to setup cronjob with crontab. I have run command crontab -e -u root 01 0 * * * /usr/bin/php /var/www/web/daily/testssh.php But it always get error: crontab: usage error: no ...