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
votes
0answers
10 views

When I create a droplet, how can I leave it active for just 1 hour?

I'm creating droplets when needed via the DigitalOcean API v2. As I'm just barely launching the app, I think it would be cheaper to launch droplets when needed instead of paying for 24/7 access. That ...
1
vote
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), ...
0
votes
0answers
7 views

Upload with SFTP after I create a backup [on hold]

I found a script that executes a MySQL backup. I wonder how could I modify this script to the point I can run it via a cron job, so I won't be required to input a password. What should I do, if I ...
1
vote
1answer
31 views

Getting my server maintenance script right

I have two routine postgresql maintenance tasks that require deletion of aged rows from certain tables of my web application. Both take ~1 hr to complete, respectively. Currently, each of these ...
1
vote
2answers
20 views

How do I include the password for the user 'postgres' in a maintenance script?

I'm setting up a cron job to do some routine maintenance for a postgresql database. The script is as follows: #!/bin/sh dbname="dbname" username="postgres" psql -d $dbname -U $username << EOF ...
-1
votes
0answers
8 views

Switch to Redis or use Redis as cache for mySQL [on hold]

I have been using mySQL to make an multi-platform application. I am looking upscale the app and so I am looking into noSQL alternatives. I have been getting the hang of Redis and I really like it. I ...
0
votes
5answers
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 ...
0
votes
0answers
18 views

Which server should I run CRON jobs/scripts on? [on hold]

My co-worker, having worked with established companies, has seen and recommends replicating the system where CRON jobs with independent scripts are stored and occur on the database server. This seemed ...
0
votes
4answers
1k views

Check if remote mysql is running

I want a bash shell script that i can run using a cron job to check if mysql on a remote server is running. If it is, then do nothing, other start the server. The cronjob will be checking the remote ...
2
votes
1answer
30 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: ...
5
votes
6answers
5k 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
0answers
11 views

Time to run znapzend job

I have setup znapzend and have created the following job: /opt/znapzend/bin/znapzendzetup create --recursive --mbuffer=/usr/bin/mbuffer --mbuffersize=1G \ > --tsformat='znapzend-%Y-%m-%d-%H%M%S' \ > ...
1
vote
0answers
38 views

Cron not logrotating for cron.daily

I'm running a rhel7 server and I have a rsyslog logrotate config file that doesn't seem to run using cron job. It will only work if i run it manually Troubleshooting steps i took: logrotate -df /etc/...
0
votes
1answer
104 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 ...
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 ...
2
votes
4answers
2k views

For tripwire, how would I have the report e-mailed only when a violation is found

My ideal solution for tripwire reports would be: Daily e-mails would only generate if a violation was found Every Sunday, a report would be e-mailed regardless of whether a violation was found I'm ...
0
votes
1answer
18 views

Adding cron jobs using crontab from several different files

I have two files where in I have listed my cronjobs: cron.dev1.txt cron.dev2.txt Now I am using crontab in the following manner: crontab cron.dev1.txt and crontab cron.dev2.txt When I do ...
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/ INFOLOG="...
-1
votes
0answers
13 views

don't work in linux ubuntu 14 (crontab) [duplicate]

I'm trying to run this command in crontab started with php, but does not work. @reboot /usr/bin/php -q /var/www/server/teste.php @reboot php -q /var/www/server/teste.php what could it be?
0
votes
1answer
25 views

Cronjob change email subject and sender name

I have a cronjob setup using crontab that looks like this... MAILTO=myemail@example.com 00 02 * * * /home/myaccount/myscript.sh This works great and at 2AM it runs the script and emails me the ...
0
votes
2answers
58 views

Cron is retrying a job every 15 minutes

I have an Amazon Linux AMI with this in crontab: 0 7 * * 1 root /usr/bin/wget -q http://localhost/digest_weekly.php -O - >> /var/log/digest_weekly.log This calls the script digest_weekly.php ...
29
votes
7answers
19k views

Can I run a cron job more frequently than every minute?

Is it possible to run a cron job every 30 seconds without a sleep command?
1
vote
3answers
66 views

How to set MAILTO in cron using Puppet?

The expectation was that there would be a mailto attribute, but the this source denies that cron { 'resource title': name => # (namevar) The symbolic name of the cron job. This name is ...
-2
votes
1answer
27 views

Write Python Output to File in Cronjob

I have a script (/home/user/script.sh): #!/bin/bash /usr/bin/python /home/user/program.py >> /home/user/logs/out.log & and it is working. The output from the python script is written to ...
0
votes
1answer
69 views

Unable to start cron service [duplicate]

Few days ago I added a cronjob using crontab -e which should run every 6 hours, however I noticed that cron job is not working. When I execute my script manually it works, and it should write some ...
0
votes
1answer
33 views

How can I list all cronjobs created by puppet?

I have several crontabs defined in a pp file, e.g: cron { 'puppet-cron1': ensure => present, command => "cat /etc/issue", user => root, minute => '*/30', } cron { '...
28
votes
5answers
29k views

How can I monitor what logrotate is doing?

How can I monitor what logrotate is doing in Ubuntu? Can the activity of logrotate be monitored?
0
votes
0answers
29 views

Elastic Beanstalk and Worker Tier? (PHP)

I'm trying to setup my app that's hosted on EB with a worker that will run some basic cron jobs to feed an RDS database with data that the app consumes. I deployed this cron.yamlat first: version: 1 ...
0
votes
1answer
54 views

%CPU at 99% when cronjob runs php script every minute

I am using a debian server and for some reason when I run this php script using crontab every minute it says that I am using 99% of the %CPU with the php command (in the cronjob the command is php) ...
27
votes
3answers
17k views

What does * * * * * (five asterisks) in a cron file mean? [duplicate]

The first noncomment line in a legacy crontab file begins with five asterisks: * * * * * ([a_command]) >/dev/null 2>&1 The authors are gone, so I do not know their intent. What does all-...
0
votes
0answers
26 views

Error in crontab file: bad day-of-week

When I run crontab -e on my Debian server and add these lines: # System statistics */10 * * * * /usr/lib/sysstat/sa1 1 1 > /dev/null 2>&1 59 23 * * * /usr/lib/sysstat/sa2 -A > /dev/null ...
1
vote
0answers
21 views

OOM using CRON but not using SHELL

When I start a java program by shell, everything is working well. However if I start the same program with the same command and same user by CRON, I get a java.lang.OutOfMemoryError just after a few ...
0
votes
1answer
37 views

Cronjob starts multiple processes

Cronjob creates multiple processes for the same script. One using /usr/bin/php /path/to/php/script And other using /bin/sh -c /usr/bin/php /path/to/php/script These are 2 separate ...
0
votes
0answers
19 views

Find Unknown Predicate JailedShell

Well, after months experimenting with ', ", and \" it seems i cant find the right pattern that could generate the correct code for a cron job on a jailed shell. I got this code below works on jailed ...
2
votes
0answers
144 views

How to use “keep_environment” option in exim 4 on Debian

I am running exim 4.84_2 on Debian, now since a few weeks I get the following mails from anacron: /etc/cron.daily/exim4-base: LOG: MAIN Warning: purging the environment. Suggested action: use ...
4
votes
3answers
20k views

How to fix a crontab access issue with a pam configuration error message? [closed]

I attempted to access my crontab as the non-root user "coins" when I encountered a permissions issue as shown in the following error message mentioning the pam configuration: [coins@COINS-TEST ~]$ ...
0
votes
1answer
27 views

Cron jobs not sending mail - Solaris 11

I need some assistance please. I've written several scripts which runs on a cron schedule as root in Solaris 11.3. When I run these scripts manually I receive the mailx mails. But when the scripts ...
0
votes
1answer
63 views

CentOS Crontab Woes

I have a shell script that I'm looking to run daily, (to update CentOS and send out a confirmation email via SSMTP). The script is working ok, and sits in /etc/cron.daily, the problem is that it's ...
19
votes
5answers
20k views

How can I prevent cron from filling up my syslog?

I have a script which needs to be executed each minute. The problem is that cron is logging to /var/log/syslog each time it executes. I end up seeing something like this repeated over and over in /...
29
votes
6answers
94k views

how to create a cron job that runs on the first day of month [duplicate]

There are fields on my server's control panel like this Minute - Hour - Day of month - Month - Day of the week - Command How can i create a cron job runs on first day of the month with this fields ...
10
votes
3answers
8k 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 ...
3
votes
2answers
9k 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, ...
0
votes
1answer
17 views

Why am I seeing much more cron jobs in webmin than in `crontab -e`?

I am just starting to learn cron jobs. Basically I am going to use webmin to manage my cron jobs, I am also reading some basic information about cron jobs. So far I've learned that /etc/crontab ...
1
vote
1answer
51 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 "$bigdata"@"$...
0
votes
0answers
14 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, '...
34
votes
5answers
27k 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 ...
0
votes
1answer
16 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
64 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
64 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 ...