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

learn more… | top users | synonyms (1)

1
vote
2answers
50 views

What the heck is going on with my cron scheduler? (rsnapshot)

CRONTABS I'm using rsnapshot with cron. Here's what sudo crontab -l shows me. 0 */4 * * * /usr/bin/rsnapshot hourly 30 3 * * * /usr/bin/rsnapshot daily 0 3 * * 1 ...
2
votes
0answers
19 views

flock command wont run through cron [duplicate]

I am trying to cron an rsync sync over ssh, but for some reason, as soon as I put the command in cron, it won't run. I don't know what is causing it to break, but it is certainly something related to ...
1
vote
1answer
33 views

Calling mailx from crond

I had a problem that gmail was blocking emails sent using mailx. I solved this by setting up an appropriate ~/.mailrc, which looks like: set smtp-use-starttls set nss-config-dir=/home/theuser/.certs ...
1
vote
1answer
26 views

logrotate not working as expected with my custom log

I turned on mysql general log, and since it was growing pretty fast I thought of using logrotate daily, so I created the log yesterday at about 2pm and this is how the log looks like: -rw-rw---- 1 ...
-1
votes
1answer
52 views

Crontab not running a shell script but works with command line

My question is about running a simple shell script using crontab. Crontab is successfully running one command like : * * * * * echo "test" >> /home/user/Bureau/testcron But not the other for ...
0
votes
2answers
65 views

Why is this commented out crontab file line executed?

To my surprise a trial of using crontab and rsync for backups of some test files, that I started last December (2015), is still running although, in the only crontab file I have, the only line is #...
1
vote
1answer
54 views

notify-send from root cron

On my system, notify-send requires 3 enviorment variables to run, which are kept in a file which is generated automatically on logon: /home/anmol/.env_vars: DBUS_SESSION_BUS_ADDRESS=unix:abstract=/...
0
votes
0answers
23 views

Godaddy Cron timezone change

There is a discussion http://stackoverflow.com/questions/13289751/cron-job-in-a-different-timezone/37764183#37764183 Could anybody clarify answer of @Bartosz Kowalczyk http://stackoverflow.com/a/...
0
votes
1answer
32 views

Use of Verbose in a cron job

I'm busy setting up a back-up script to run on my Pi using rsync. I see that a number of people use the -v option in their cron jobs. Why? It's going to be run as root, and not in a terminal where ...
0
votes
1answer
32 views

How can I set the MAILTO variable for an at job on AIX? [closed]

I'm calling at jobs on AIX servers using this method: /usr/bin/at now +1 minute << EOF chmod 700 /var/tmp/somescript.sh cd /var/tmp sh /var/tmp/somescript.sh > 2>&1 EOF If ever some ...
1
vote
1answer
36 views

Using 606 file permissions in /etc/cron.d. (root) BAD FILE MODE)

I have a file in /etc/cron.d with 606 permissions to be run by root. The intention is to provide read & write access to 'others' via 606 to allow a script to modify the file. Cron does not ...
1
vote
4answers
57 views

How do I delete file by filename that are set as dates?

I want to delete file not by date access or created, but by filename. The filenames will be dates and I want to have a cronjob run once a week that will purge filename dates older than 7 days. I could ...
1
vote
1answer
40 views

sh script containing perl element does not produce same output via crontab as manual execution

I tried posting this on Stackexchange but I think I may have more chance of a correct answer here as its very linux specific. I have an sh script which updates data in a csv, then runs a perl script (...
0
votes
0answers
15 views

Settings of Poller Interval and Cron Interval on cacti

Latest version running of Cacti on linux machine and I am bit confused with Poller Type, Poller Interval and Cron Interval. The current setup is set to monitor ping latency, linux machine and dns ...
1
vote
2answers
37 views

Automatic backup and exclude of certain folders

I have created the follow bash script to be used in Cron for automatically backing up certain folders,...while also excluding certain sub folders: folders_to_backup=( "/fist/folder/to/backup/" ...
1
vote
2answers
25 views

@reboot jobs don't work

I have been trying to make my fedora pc do a little script at reboot but i can't get it to work. My script works perfectly, for example if it's 02:10 and inside crontab -e I write 11 02 * * * /path/to/...
1
vote
1answer
37 views

why the executing shell within cron job will take longer time than normal? [duplicate]

I have a shell script which will run project consist of multiple JUnit tests. Then I call this shell within cron job every a period of time. In this case, I observe the following: Time to complete ...
1
vote
2answers
31 views

crontab each 12 hour - when will it send an email?

I am installing new crontab job which will execute a shell script and then send the printed errors on the console to email. I know all of the required steps to do, which will be as following: 0 10,...
0
votes
2answers
58 views

How to run multiple scripts at a same time?

Suppose I want to run five different scripts at 3 PM on every Saturday and I want to put all these scripts in a single script and run it using cron.
1
vote
1answer
25 views

when the cron job start after installing new crontab?

I need to a crontab execute each 12 hours, so I have the following: 0 */12 * * * . /X.sh then Linux is installing new crontab. after that, I am waiting for 2 hours and still the cron job didn't ...
1
vote
1answer
48 views

How to schedule run shell script that opens Firefox [duplicate]

I have the shell script which opens Firefox and launches macros in it (I use a Firefox add-on called Imacros to create macros). The content of my shell script named house.sh is like that: firefox ...
1
vote
1answer
40 views

Running a cron job randomly for every one hour

I want a cronjob to run every one hour randomly. (i.e if the first job runs at 58 minutes,the second job should run at 47 minutes and the third one at 52 minutes and so on) But this should run ...
1
vote
1answer
30 views

My backup_system.sh file didn't run under crontab

So i created a script used to backup system, i tested and it worked. Here's the script: #!/bin/bash backup_files="/home /var/spool/mail /etc /root /boot /opt" dest="/mnt/backup" day=$(date +%F) ...
1
vote
0answers
22 views

Minecraft acting differently when started from terminal compared to started by cron job at start-up

So I use a CentOS Linux 7.2.1511 server, where I host a couple of things, amongst them a Minecraft server. Since from time to time server is rebooted I scheduled a cron job to run minecraft server on ...
1
vote
2answers
20 views

Get owner / user of a cronjob

In Linux (Mint / Ubuntu), I can create cronjobs for each user individually. Is there any way, I can find out the name of the user against whome the cronjob is running. I want to get the username of ...
1
vote
1answer
34 views

Get a list of all scripts and their paths which are run as cron job

I am looking for some script or terminal command to list all the scripts (preferably with their paths) which are run on a periodic basis by cron, cron.daily. I am not looking for any filter for time-...
1
vote
2answers
52 views

Where are my lost cron jobs?

I am trying to port the code over to a new server hosted somewhere else, and I want to know what cron jobs are running on the old box. Where can I find these? crontab -l SHELL="/bin/bash" 0 0,6 * * ...
1
vote
1answer
27 views

Crontab and NMCLI

I have created a script called connection.sh, it is used to automatically connect to my vpn : #!/bin/bash nmcli connection up MyVPN I have already tested it, and it works if I launch it manually, ...
0
votes
1answer
27 views

Custom scripts under /etc/profile.d and /etc/init.d - rhel6 and rhel7

I need to start my script during boot time. I have read that the scripts under /etc/init.d & /etc/profile.d are sourced during system startup. How different are these directories? Other than the ...
0
votes
2answers
30 views

Does cron execute jobs asynchronously?

If I add 5 jobs in my crontab, do they execute asynchronously in parallel ? Two of my jobs may take 10 minutes to complete and I want to know if I need to run them in the background (by adding the &...
0
votes
4answers
70 views

Ensure that cron daemon stays running

If on a debian 7 server (wheezy) running in a hosted VM and an up-to-date cron daemon there is a bug so cron stopped running without obvious reason. Since this only happened once ever since, it is ...
1
vote
1answer
45 views

launch process foreground on boot

I know how to launch programs in the background with cron on boot or at certain intervals, but in this case, I want to launch a python script in the foreground, automatically when the computer starts, ...
0
votes
2answers
50 views

Cron Job: Redirecting shell script output to a file

Just an one line shell script below not working as a cron job but executing directly from terminal works fine: #!/bin/bash echo "Executed" >> ./crond.log 2>&1 What might be the ...
0
votes
1answer
47 views

How to run a script outside of home directory via cron

I have a script located at /home/user/backup.sh I'm trying to execute this script via my root crontab. It isn't running. The script works if I create the crontab under my user account. Is there ...
0
votes
0answers
35 views

Default crontab that executes cron.(hourly|daily|weekly|monthly)

I have to build a crontab that will execute (with run-parts) any script located in the standard /etc/cron.(hourly|daily|weekly|monthly) folders. I have never done this before. Does this look correct?...
-5
votes
1answer
67 views

Shell script to delete logs when the disk space reaches 90%

I need help to develop a shell script to delete the logs automatically once the disk space reaches 90%. I can add this shell script to crontab jobs.
1
vote
3answers
104 views

add text on line before match

Trying to add text on the line before that it find the match (updateKey.sh) in this case, but won't get it to work. Here is my crontab file that the script adds the line to 0 06,18 * * * /home/server/...
-2
votes
2answers
51 views

Why does running a Cron Job as root stop the sshd service and disallows login for other users?

I have a script for getting Clamav updates from another server which I run as a Cron job as root. Also, I have root login disabled for /sbin/nologin. But this has serious implications on the system as ...
0
votes
1answer
62 views

CRON: pam_unix(cron:session): session opened for user root by (uid=0): Is it a must have process?

This post is somewhat similar but mine is rather specific. CRON: pam_unix(cron:session): session opened for user root by (uid=0) Is this really a bug? In our system this process is creating ...
0
votes
0answers
23 views

cron job quit working after latest apt-get upgrade

I've been running a cron job every 15 minutes for years, with few problems. Sometime in the last week, it quit running, I'm assuming after a apt-get upgrade && apt-get dist-upgrade. I was ...
1
vote
1answer
59 views

Two cronjobs not working (one to start a process, one to stop a process)

I typed the following into crontab -e 0 0 * * * bitcoind -datadir=/home/pi/bitcoinData -daemon 0 6 * * * bitcoin-cli -datadir=/home/pi/bitcoinData stop I expect this to run bitcoind -datadir=/home/...
0
votes
1answer
41 views

Crontab: Why won't it execute script

So in the past I just did a simple shutdown crontab, and that was it. Lately, I want to do something a bit more complex, so I'm trying to get it to run a script. Right now I've boiled it down to a ...
3
votes
1answer
37 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
83 views

How to build cron docker image properly?

I am trying to build Debian-based image to dockerize cron process, but my cron jobs are never started. Here is my Dockerfile: FROM debian:jessie RUN apt-get update && apt-get install -y --no-...
0
votes
1answer
47 views

Cron stopped logging to /var/log/cron.log

A month ago I set cron to log to /var/log/cron.log by modifying /etc/rsyslog.d/50-default.conf. Logging worked great until I changed permissions on /var/log (by easing permission restrictions), and ...
1
vote
0answers
13 views

Using crontab to start redshift on boot? [duplicate]

I am using crontab to start redshift on boot. @reboot /usr/bin/redshift is showing from crontab -l. My redshift.conf is configured properly and invoking redshift works from the command line. Also ...
0
votes
1answer
56 views

Cannot Bash chgrp GROUP /home/*/SOMEFILE/ How to do it?

So am setting a code that will change group owner of the file to a specific group. PS there are more than 10 users, with same folder and file structure, and i want change the ownership of a specific ...
0
votes
1answer
29 views

cron not working with commands symlinked in custom PATH

I have a script job.sh in /home/user/scripts, which is then symlinked to /home/user/bin/job. The custom binaries path has been included in .bashrc, so whenever I issue the command job param1 etc from ...
1
vote
4answers
148 views

Dangers of using rm command with variables

I am creating a crontab that compresses 15 minute clips from my security camera into one file (24 Hours Long) and then having the clips delete. avimerge -o /media/jmartin/Cams/video/Full_$(date +%F --...
3
votes
1answer
30 views

How to one way sync two folders on startup

I am trying to synchronize: /var/www/CI_MAIN/ according to the changes made in: /home/coco/workspace/CI_MAIN/ (PDT's workspace). To do this, I entered sudo crontab -e in the command ...