Cron is a job scheduler that allows users to run commands periodically.

learn more… | top users | synonyms (1)

2
votes
1answer
29 views

Send cron mails to root bundled every hour

Sometimes when there's a problem on my server, I get hundreds of emails in my root account which are caused by cron. I want to be notified about those problems but isn't there a way to bundle those ...
2
votes
1answer
137 views

Solaris cron ignoring mail aliases?

As a Solaris user, I want cron jobs generated emails for the localuser@server to be forwarded to my myuser@sample.com email account, so that I read only one inbox. To resolve this I have forwarded ...
2
votes
1answer
114 views

Cron does not execute xinit command

I have a command that works perfectly when launched from the prompt: xinit /home/user/myscript.sh -- /usr/bin/Xvfb :1 -screen 0 1x1x8 But is not executed when put in crontab: @reboot xinit ...
1
vote
1answer
58 views

How to restart my server automatically using crontab if they went down?

I have a jar file which I am running like this in my Ubuntu 10.10 and then it starts my exhibitor server in the background - nohup java \ -jar ...
1
vote
1answer
51 views

CentOS machine keeps “losing” active directory membership

All of our CentOS 6 machines have been joined to our active directory domain. Each of these machines eventually "loses" their domain membership, which breaks authentication for AD users. I created a ...
1
vote
1answer
105 views

How can I periodically check if my network is up and reconnect if not?

I've written a script to periodically check whether my network is up by pinging three major sites and disconnecting and then reconnecting my network if all three fail. This script works fine from the ...
1
vote
1answer
95 views

How to set up Cron to run mysqlauditgrep command for 11AM on Friday

I am trying to set up cron to run the mysqlauditgrep command (its the MySQL 5.6 Utilities package). The mysqlauditgrep command is in bash. The command I am looking to run is: mysqlauditgrep ...
1
vote
1answer
235 views

Logrotate not picking up or acting on new configuration file

I had a logrotate configuration file set up for a log (let's call it Log1). It is working fine and the log is rotating everyday as expected. Yesterday I cloned this set up and modified it for three ...
1
vote
1answer
263 views

Rotating iptables logs, strange message about script being converted to upstart job

I use a script /etc/logrotate.d/iptables containing entries like: /var/log/in_iptables.log { rotate 4 weekly missingok notifempty compress ...
1
vote
1answer
115 views

How can I create cron jobs in specific files?

I want to have a separate folders for cron jobs like: /mydata/cronjobs Now in that folder I want to have files like backup_server which will have the content like: 30 3 * * 1-5 ...
1
vote
1answer
92 views

Lock a script starting daemons

I'm run a script with cron: */10 * * * * flock -n /tmp/lock script I have to make sure that only one instance of the script is running at the same time, and for that I'm using flock. The problem is ...
3
votes
0answers
27 views

high precision subsecond cronjob replacement

I am looking for a cron replacement which could run subsecond schedule, is there have any "still alive" project which serve this purpose? Currently running Ubuntu 14
3
votes
0answers
787 views

cron is ignoring MAILTO

I have big trouble with cron. On Debian 6, it is ignoring the MAILTO variable. Is there some other variable that has to be to set for cron to send emails to a different email address then local root? ...
2
votes
0answers
16 views

Remove tar compress spool from cron email

I have a crontab job that call a simple script to backup a website: 15 0 1,10,20 * * /home/username/bin/backup_whatever This is the script: #!/bin/bash TODAY=$(date +"%Y%m%d") ...
2
votes
0answers
31 views

Configure job to expire

I'm learning Linux at the moment and were doing some exercises scheduling jobs with cron and crontab, but I'm wondering if it's possible to limit the amount of times that the scheduled job is ran. ...
2
votes
0answers
314 views

`crontab -e` sometimes fails with “Creation of temporary crontab file failed”

From time to time crontab -e fails on me on a Ubuntu box. It is the same for all users including the root and crontab -eu <user> under the root. Goes like this on a regular basis, a success here ...
2
votes
0answers
141 views

Use dedicated per-user log file for cron and?

On Ubuntu 12.04 how can I configure cron to log to a particular file when it runs jobs as a particular user? I am interested in redirecting both the messages that go into auth.log and those going into ...
1
vote
0answers
22 views

Logrotate or scripting to manipulate log file

I want to make sure that a certain log file gets empty when it reaches a specific size. I first used logrotate since the man page says: It will not modify a log multiple times in one day unless ...
1
vote
0answers
16 views

How to monitor the integrity of a script that is running?

I want to make sure a running python script was not modified accidentally by some other process (or cosmic ray, or unexpected developer update). I've heard of comparing a checksum of the script (e.g. ...
1
vote
0answers
16 views

How to set one job to run at precise time with anacron without losing config at next upgrade?

I want logrotate to run at a precise time daily. Currently it is set to run at some random time using anacron and I don't want to change the randomness factor for all the other jobs. I have ...
1
vote
0answers
47 views

Cron can't access my home directory when I'm logged out

I have quite a strange problem using cron. I distilled it thus far: I created following simple bash script in /home/user1/cron_dir/cron.sh: #!/bin/bash echo "Success" As user1 I created following ...
1
vote
0answers
8 views

start xscreensaver from cron@reboot, ubuntu startup, service/deamon?

I need start xscreensaver for ubuntu, and it can be started in ubuntu startup application. my question is: can xscreensaver be started in cron@reboot? can xscreensaver be started in service/deamon? ...
1
vote
0answers
57 views

How to do version-control repository update in crontab?

I'm trying to automate version-control repository update in crontab. The following script /home/usr/mrbean/bin/update.sh works in interactive Bash command-line: #!/bin/bash ...
1
vote
0answers
83 views

Cron job scheduled to run on specific day-of-week is running on last day of month as well

I have a cron job scheduled to run every Thursday at 6am via the following schedule: 0 6 * * 4 It's been running as expected, but on Tues, September 30th it ran (unexpectedly) and again on ...
1
vote
0answers
71 views

Maintain screen session when executing shell script on boot

Solved: I solved this problem by introducing a delay before executing the script: @reboot sleep 60; /root/start_server.sh On Ubuntu 14.04, I have a crontab entry set to run on reboot: @reboot ...
1
vote
0answers
139 views

systemctl to start cron-like job

In /etc/systemd/system directory I have: rsnapshot-backup.service file, with following content: [Unit] Description=rsnapshot backup automation [cron like] [Service] Nice=19 IOSchedulingClass=2 ...
1
vote
0answers
220 views

Permission denied when running logrotate with anacron

I am trying to figure out what is causing anacron to send me the following error message: /etc/cron.daily/logrotate: /var/log/mariadb/mariadb.log-20140710.gz: Permission denied error: error running ...
1
vote
0answers
84 views

Cron job running but not establishing tunnel

I have a script which establishes a reverse tunnel on an endpoint HostB. It looks like this: cat tun.sh #!/usr/bin/env bash # Test code /usr/bin/ssh -V 1> /home/userA/bin/tun.stdout 2> ...
1
vote
0answers
150 views

Incrontab does not execute command

When I use incrontab out of the box, I mean no changes, I get no result, as if the command was not executed. my incron line is : /crrae IN_CREATE,IN_CLOSE_WRITE,IN_MOVED_TO /usr/bin/unix2dos $# the ...
1
vote
0answers
27 views

How to block the user for a certain amount of time

Suppose, I am working in X environment, and I want to have an obligatory periodic rest. Is it possible to setup a root cron job, that will block my user for 5 minutes every 45 minutes? I am using ...
1
vote
0answers
2k views

Trying to kill cron job processes found by “ps ax | grep keyword” logged in as pi user

I'm trying to kill several processes from the command line logged into the pi as the user pi. All of the processes have been started by cronjobs, so they should belong to the root user. I'm running ...
1
vote
0answers
69 views

Create a fake read only device like file with incrond

I need to generate UUID with uuidgen (not through any function call, but external command, because processes which will read the file cannot call any APIs or external commands directly). My idea is ...
1
vote
0answers
38 views

Unplug AC causes anacron to stop. No resumumption if cron.daily had already started?

Anacron is started/stopped by a number of means, one of which is when AC power is plugged/unplugged, as can be seen by examining /etc/apm/event.d/anacron and /usr/lib/pm-utils/power.d/anacron. You can ...
1
vote
0answers
790 views

wget command not working in cronjob

here is my command : wget -c -O /home/alireza/Desktop/1.mkv http://mysite.com/myfile and here is my /etc/crontab file : SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ 0 2 ...
1
vote
0answers
118 views

Scheduling cronjobs at specified time

I have scheduled some jobs in crontab which are to be run one by one, at some specific time. My script for crontab is : 15 10 * * * /Users/sri/files/BatchFF.sh 45 11 * * * /Users/sri/files/BatchGC.sh ...
1
vote
0answers
141 views

External HDD read/write permission changing from a cron job

So, I run an overnight python script that runs a backup of our web data in the /var/www directory, then moves the backups to an external HDD in /media. The script in scheduled in the sudo crontab ...
1
vote
0answers
630 views

Cron file syntax checker/validator script

Does anyone know a script (bash, perl, php ...) to validate the syntax of crontab files? I found this http://www.intuitive.com/wicked/showscript.cgi?053-verifycron.sh but just Vixie cron notation is ...
0
votes
0answers
26 views

Issue running Python script via cron inside Docker

I have an official Ubuntu 14.04.1 container running via Docker. cron is working fine, I added * * * * * /bin/echo "working" >> /test to my crontab using crontab -e and then I started cron with ...
0
votes
0answers
22 views

How to know the which jobs are scheduled in cron for today

I am looking to get the details of jobs which are scheduled to run from cron for today and need to make it as a script by 12AM every day to get the job details that are scheduled for today and like ...
0
votes
0answers
49 views

Configure cron for daily NMon task

I want to configure a cron job for NMon to gather stats during all day, everyday. Leaving a file per day to dump into NMon Analyser. I know the proper command to get a spreadsheet format its ...
0
votes
0answers
27 views

How to prevent cron emailing on termination

Whenever one of my cron scripts finishes, I get an email saying /bin/bash: line 1: 19653 Terminated <command>. How do I prevent this email being sent? I suspect it might only happen when the ...
0
votes
0answers
249 views

Using gpg-agent to decrypt password in cron job

I have two scripts that both need to decrypt passwords using gpg-agent. Both of them run fine when launched from the terminal. The problem is that when run via cron, they both fail with these ...
0
votes
0answers
77 views

Fetching all Git repositories in the background

I'm thinking about setting up a cronjob for fetching all my repositories every once in a while, to have the current status ready in case I'm offline. Something like the following (wrapped for better ...
0
votes
0answers
1k views

why daily cron isn't running on CentOS 6?

I have a daily cronjob set up on CentOS 6 OS which should look after the log rotation job. The file is /etc/cron.daily/logrotate and it's contents are #!/bin/sh /usr/sbin/logrotate ...
0
votes
0answers
126 views

filter cron emails through procmail?

I'm using postfix/mutt/procmail on a Linux/Debian and I've some trouble filtering cron emails with procmail, I just want to move them to the cron/ maildir directory, but no lucky till now. I've ...
0
votes
0answers
25 views

Run Xdotool on multiple users at once

When running Xdotool on user one (cron): * * * * * export DISPLAY=:0 && xdotool mousemove 10 10 and I switch to user two for several hours, and back to user one, I find out Xdotool not ...
0
votes
0answers
49 views

How do I interpret an entry about cron in Gnome System Log Viewer

Apologies if this turns out to be a trivial question. I am trying to set up a regular backup of my files prior to installing Fedora 19 instead of my current Fedora 12. In November 2013 I started a ...
0
votes
0answers
283 views

CakePHP shell as cron permissions issue

First to say that I know basics of Linux systems. I am familiar with cron jobs. I am using CakePHP shell as cronjob. The script is using model's method to download pages from site user entered. ...
0
votes
0answers
276 views

Facing issue with cron on embedded linux

I have a SAM9 based board running embedded linux using buildroot package. I added the crond and crontab support to busybox from make menuconfig and built the rootfs and flashed it to my board. The ...
-2
votes
0answers
51 views

How to recover my source code that is removed by stupid CentOS automatically?

I have no backup, and my server scripts are running as production, but unfortunately CentOS removed my all files stored in /var/tmp Now my source codes are lost, but still its running as below, how ...