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
2answers
278 views

SQL Server DBA moving to Greenplum / Postgres on Linux ( Centos ) looking for friendly MS Sql Agent like scheduler instead of CRON

To be honest, I and others are spoiled by Microsoft's SQL Agent. We'd really like to keep properties of SQL Agent : the features, the usable GUI. I searched serverfault for an evaluation of ...
1
vote
1answer
1k views

how to properly run a scrapy crawl from cron

How would I run a command like scrapy crawl empt.com in a cron job where I need to be in a specific folder to run the command for example: /downloads/my_crawler/empt/empt/ then the command scrapy ...
0
votes
2answers
58 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
28 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: ...
1
vote
3answers
104 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 ...
-4
votes
3answers
39 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
2answers
4k views

How to cron run every 1 hour on ubuntu 9+? [duplicate]

How to start a script using cron every hour?
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 ...
0
votes
2answers
807 views

shell script within crontab

I can run the following shell script from command prompt as expected: /bin/sh -xv /home/shantanu/backup_transfer.sh But when I set it in a cron, it does not execute correctly. There are 2 ...
-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
1answer
30 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 ...
1
vote
1answer
837 views

Setting 'From' header for cron email using msmtp

I've got msmtp setup on Ubuntu 10.10 so that cron can send me emails. That works like a champ, for the most part. However, emails coming to my gmail account show up as coming from (unknown sender), ...
0
votes
2answers
57 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 ...
4
votes
1answer
3k views

Users cannot use crontab after password security upgrade

I have a box being upgraded from CentOS 5 to CentOS 6. On the original server, all users have MD5 passwords. The upgraded server is now using SHA-512 passwords. Users who have changed their password ...
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: ...
39
votes
3answers
22k 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 ...
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: ...
4
votes
7answers
15k views

script to automatically test if a web site is available

I'm a lone web developer with my own Centos VPS hosting a few small web sites for my clients. Today I discovered my httpd service had stopped (for no apparent reason - but that's another thread). I ...
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
39 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
66 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 ...
-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
59 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
23 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
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
34 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
35 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
48 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
62 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 * * * * * ...
1
vote
4answers
1k views

crontab ifconfig outputting nothing

/home/myname/bin/script: #!/bin/bash ifconfig > /home/myname/foo Crontab: * * * * * /home/myname/bin/script ...waits 1 minute... @@ 11:35:51 [myname@comp - ~]$ ls foo -rw-r--r-- 1 myname ...
-3
votes
1answer
41 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
26 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
112 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 ...
-4
votes
6answers
122 views

Help with UNIX Crontab! [duplicate]

I want to shedule a task for 8.30am every Monday, for every month, for every year... What would the UNIX Crontab format be? Many thanks O.
1
vote
2answers
165 views

Check if cron ran and have fallback

I have written a realtime bus tracking program that runs a cron every minute to check the service of the bus. In order to remove some server resources I am going to be creating an instance on PHPfog ...
2
votes
2answers
844 views

Adding file to /etc/cron.d doesn't make it run (ubuntu 10.04)

If I scp a cron file into /etc/cron.d it doesn't run unless I edit the file and change the command. Then crond seems to pick up the cron file. How can I make cron reload its cron files in ubuntu ...
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 ...
40
votes
4answers
42k views

Running Cron every 2 hours

I have the cron job as shown below, and wanted it to run every 2 hours, but it keeps running every 2 minutes. Can someone tell me where I'm going wrong? * */2 * * * /path-to-script
0
votes
1answer
57 views

crontab in different sessions

I started a crontab job in a server remotely (in a screen session) from a local machine. Days later, I terminated the screen session and restarted my local machine. The cron job in the server is still ...
1
vote
1answer
69 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 ...
7
votes
6answers
6k views

crontab environment

I have written various scripts to launch Java server applications, which are typically run for 24 hours before being shut down (by invoking the same script with a different parameter). The script ...
1
vote
0answers
62 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 ...
1
vote
4answers
107 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 ...
0
votes
1answer
45 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 = ...