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
20 views

ZFS Send Script works when run manually but not in Cron (Already tried common solutions)

Script on sending end is as follows: #!/bin/sh #Variables bigdata=vid-zfs-live/bigdata today=`gdate +%m-%d-%y` yesterday=`gdate -d'yesterday' +%m-%d-%y` #Actions zfs snapshot -r ...
0
votes
0answers
10 views

Wyse Enhanced Ubuntu Terminal Locked Down?

I'm dealing with about 20 Wyse T50 thin-clients and I want to set up cron, however, it seems like there are a number of things locked down in the Wyse Enhanced Ubuntu terminal. For instance, ...
2
votes
2answers
2k 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), ...
33
votes
5answers
25k views

How to send the output from a cronjob to multiple e-mail addresses?

In the beginning of a crontab file you could use the MAILTO instruction to indicate you want the output to be sent as an e-mail to an e-mail address. I would like to send the output to multiple ...
5
votes
5answers
4k views

s3cmd run on command line not on cron

Many have said that the problem is with environment but I still can't seem to solve this problem. BTW I am using Ubuntu 9.10 login as user, then sudo -s using this command: s3cmd put file s3://bucket ...
0
votes
1answer
8 views

Linux last login get the logins yesterday and email it the next day or specific time via crontab

I need to know the last login yesterday and email it to me via crontab.... Since the last command shows all the login you need to scroll up. Using grep and cut might do the trick.
0
votes
1answer
38 views

Cron Job error says ioncube is not installed when it is

I have a website (mivprofit.com) and this website works with a script that requires a couple of cron jobs to run once a day. I have a cron email set and whenever the cron job runs this is the email ...
1
vote
2answers
61 views

Scheduling a job to run every 23 minutes

There are cases when I need to run a scheduled job in more complex way that Cron is able to provide. Say, to schedule a job to run every 23 or 65 minutes. In the latter case it can be worked around ...
0
votes
2answers
509 views

Linux CentOs 2.6.18 Setting locale for cronjobs

I have the problem, that I am trying to automate some Informix database job via the crontab. The job runs fine when done via the command line or processed via the at queue, but not via the crontab. ...
0
votes
0answers
24 views

Cron jobs running 9hours 15min late

I have a Cron Job set to run Nightly at 22:01 followed buy three others at 23:59 02:10 and 02:15 The Cron log shows that they are kicked off at the correct time.. :cron.log file snippet: Apr 12 ...
1
vote
5answers
301 views

Is it possible to delete the last line within a file using a command?

I've accidently distributed a line to /etc/crontab on many servers and i noticed that there's a typo in this line and i need to change it on all servers.
0
votes
1answer
26 views

Error configuring Cron with php command

So i have been configuring a phpIPAM server and as the documentation suggests, to make an automatic discovery of hosts, i need to use a scheduled process. I have tried in /etc/cron.d with no luck and ...
2
votes
2answers
519 views

how to prevent crontab logs from registring in syslog?

I have separated my crontab logging into /var/log/cron.log by uncommenting the below line in /etc/syslog.conf, but it still writes to /var/log/syslog too! cron.* ...
1
vote
3answers
2k views

Capturing output from a remotely executed command via SSH fails in CRON

This question is in a direct relation to this one: ssh fails to execute remote command when run from cron bash script - works from CLI I'm not able to comment on the accepted answer as I don't have ...
0
votes
2answers
41 views

User management with cronjob [closed]

In my organization, we want to implement a user management standard after an utter chaos. Where we(organization) and the client was able to access root user and they made changes which took down the ...
0
votes
3answers
2k views

Segmentation fault when running PHP script from CLI, works fine as cron job

I have a PHP script that reads a file via fgetcsv through PHP's zip:// wrapper. This works fine locally and when run on production via a cron job. It fails with a Segmentation fault when invoked on ...
0
votes
2answers
13 views

Cannot locate currently running cron jobs

I know this is a dumb problem, but I cannot seem to locate/access a group of cron jobs that I have running (which I know are running, because everything is working properly and we can see the expected ...
-1
votes
0answers
6 views

Cron seems to be missing [duplicate]

I have a self installed VPS running CentOS 6.5, with no panel. logs do not appear to be rotating, but all the logrotate configs look fine. There is an etc/cron.daily directory with a logrotate file in ...
0
votes
4answers
1k 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 ...
-2
votes
3answers
31 views

seetting cron on server issue with saving and exiting [closed]

I am new to servers and I want to setup cron. I want to check if cron is running on the server. To do that I use the following command. crontab -l I looked on Google for a command to check what is ...
-2
votes
1answer
33 views

Add date using echo without calculating [closed]

I should add the line to /var/spool/cron/crontabs/root on my ESXi: /bin/echo "0 3 * * 6 /ghettoVCB-master/ghettoVCB.sh -g /ghettoVCB-master/text.conf -f /ghettoVCB-master/text.list > ...
0
votes
1answer
1k views

Compress and remove logs from jboss on linux with cron

I need to compress and remove log files after some time from serwer. I have never write scripts before. So far i have script logs.sh: #!/bin/bash LOGS=/usr/local/jboss/server/default/log/ ...
-2
votes
1answer
32 views

Script to remove suspended accounts automatically from Linux server [closed]

I have Linux hosting server with centOS, which have WHM installed on it. To reduce the costing and mis-usage of Disk space i am creating a shell-script which automatically removes the suspended ...
0
votes
2answers
154 views

Unable to run a python3 script in CentOs7 [with python2.7] via cronjob

I have been trying to deal with this strage problem all morning. I have a simple crawler.py file, which contans a code that can only run under python3 to be exact under python3.3 evenrionment Now, ...
0
votes
1answer
24 views

Unison on bootup

So i have unison running thru a config file by default. In here it applies the wait=watch function so it syncs automatically. but i wanted to run unison on boot, but i haven't been able to this this. ...
1
vote
0answers
19 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
24 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
66 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
16 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
32 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
45 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
40 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
86 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
29 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?
14
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
29 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
2answers
8k views

Cronjob run every two weeks, on Saturday, starting on this saturday [duplicate]

Today is Friday, October 3, 2014 3:58 AM I want to schedule a cronjob like that to run it at the following dates: Saturday, October 4, 2014 8:00 AM Saturday, October 18, 2014 8:00 AM Saturday, ...
-2
votes
1answer
24 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
386 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
26 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
224 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
38 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
33 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
50 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
574 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 ...
97
votes
4answers
125k 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 ...