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
129 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
109 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
49 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
44 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
86 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
82 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
209 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
241 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
90 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 ...
1
vote
1answer
203 views

security concern around adding cron user to web application group

I have a permissions issue on my CentOS 5.6 machine with regards to the cron user. On my test/staging environment my cron user (picco-cron) is a member of one group - picco-cron, as below: ...
0
votes
1answer
44 views

Crontab permission problem

I have a fc19 host at work. This morning crontab did not work. $ ls -l /usr/bin/crontab ----------. 1 root root 53472 Jun 11 2013 /usr/bin/crontab The permissions -------- means no one has access ...
0
votes
1answer
231 views

CRON job to check if PHP script is running

I am having trouble regarding CRON jobs, I've basically got two php scripts that I want to keep running continuously on my server. Currently I am using an infinte loop to keep them going but they seem ...
0
votes
1answer
62 views

openSuse, not running the cron job

I have created a cron job in the /etc/cron.d/dispatchingEmail_I the permissions of dispatchingEmail_I are the following: -rw-r--r-- 1 root root 84 Sep 11 19:52 dispatchingEmail_I content of ...
0
votes
1answer
66 views

Autodelete old files

I've many shares on my samba server with recycle bin module activated. When deleting remote files from Windows I see .Trash directory. I'd like to automatically remove older files, i.e. 30 days or ...
0
votes
1answer
102 views

How to get cron to delete files with names starting with foo and file extensions ending with bar? - done with php script

I'm sorry to post such a question but honestly, I've spent hours reading posts and still it doesn't work... Also if this should be posted else where but this felt like the right place. I have a ...
0
votes
1answer
325 views

how to automatically cleanup failed PHP uploads in /tmp?

How can I automatically cleanup failed uploads? PHP is storing them in /tmp and all file names look like phpAbCDeF (basically php followed by 6 characters). I know that I can use the command: find ...
3
votes
0answers
24 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
766 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
28 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
273 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
133 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
41 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
6 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
53 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
63 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
58 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
114 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
205 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
80 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
148 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
68 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
729 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
115 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
613 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
35 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
26 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
230 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
75 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
123 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
48 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
276 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
272 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 ...