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

learn more… | top users | synonyms (1)

5
votes
1answer
35 views

The user x cannot use this program (crontab)

Ubuntu 14.04 I don't understand the behaviour I'm seeing with setting up crontab for a service (no login) account (named curator). When I'm logged in as root, this is what I get: # crontab -u ...
0
votes
1answer
21 views

CentOS - cron service dies every few days

I am on using CentOS 6.7 server and every few days my cron service dies. I've tried checking: cat /var/log/messages | grep cron but there was nothing relevant. How can I check what's killing the ...
0
votes
0answers
24 views

Crontab and python script

On raspian I created a crontab file using the following command: sudo crontab -e Added the following lines to cron @reboot sudo /etc/init.d/cron start 0 * * * * sudo /usr/bin/python3 /home/pi/dev/...
1
vote
1answer
35 views

Can not connect to the host itself

Well, the problem is simple. I have the site based on apache and trying to execute cron job at this site from the same server. Let's say my site http://example.com and cronjob is /usr/bin/curl http:/...
2
votes
1answer
14 views

How do I set tmux's window size in a session started by cron?

In my crontab, I reference a shell script, print-size, that contains the following lines. #!/bin/sh tmux new-session -t check-size -d tmux send-keys -t check-size 'echo $COLUMNS $LINES' C-m When ...
1
vote
0answers
33 views

mutt doesn't run as a cron job wrapped in a bash script

mutt runs correctly like this: $ cat /home/user/test this is a test $ mutt -s "test" to@destination.org </home/user/test If I put this inside a bash script (stored in tmp1): #!/bin/bash /usr/...
2
votes
4answers
67 views

Add something to crontab programmatically (over ssh)

I have a deployment script, it must add something to a user crontab (trigger a script that clean logs every XXX days), however this must only be done during the first deployment, or when it needs to ...
0
votes
2answers
38 views

Problem using ssh with crontab

I need to establish a permanent ssh tunnel between private server behind firewall and a public server so that I can ssh into private server anytime via the public server. When I manually execute this ...
1
vote
2answers
121 views

Crontab never running while in /etc/cron.d

Here's what I did on Debian Jessie: install cron via apt-get install cron put a backup_crontab file in /etc/cron.d/ However the task is never running. Here are some outputs: /# crontab -l no ...
-2
votes
1answer
21 views

Halt the server daily at a specific hour

I have a CentOS 5 server, I want it to halt DAILY at 21:00 and wake up DAILY at 8:00 For the wake up I did it in the bios, but for the halt I want to configure it through cron. How to do it with SSH? ...
1
vote
2answers
63 views

How to use exit status in crontab

I add the following script line to the red-hat crontab, script should run on Saturday in 5:00 in the morning. In order to run the script /var/scripts/PLW.pl every Saturday at 05:00 morning. I want to ...
0
votes
0answers
9 views

What am doing wrong with this systemd/Timers setup?

I want "bot.sh" to be executed every 15 minutes. What am I doing wrong? /etc/systemd/system/redditbot.service [Unit] Description=reddit bot anti_anti_adblock [Service] Type=simple ExecStart=/home/...
0
votes
1answer
27 views

What is Alternative of initlog (present in RHEL5) but deprecated in RHEL6?

I am using initlog tool in a cron file to write the output of ntpq -p command in syslog.. But initlog command has been deprecated in RHEL6. Now, I want know the alternative of initlog command in ...
0
votes
1answer
27 views

Linux redhat crontab + run script with arguments

I add the following line to the red-hat crontab in order to run the script /var/scripts/info_from_all_sites.bash every Friday at 00:00 night script should get as argument the file - /var/RT/names....
2
votes
4answers
345 views

Move in crontab -e editor

I'm trying to manipulate the editor of crontab but it's really really confusing. So I launch the creation of a new crontab with crontab -e Then the default editor opens. Now from there, it's seems to ...
1
vote
2answers
43 views

Inline Crontab Commands?

Is the following crontab possible? 0 4 * * * /sbin/sudo shutdown -r now I want to run a single command, sudo shutdown -r now, from a crontab without having to put it in a bash script.
0
votes
1answer
33 views

Cron job not logging?

Ubuntu Server 14.04 LTS, and I've got the following in a crontab: 00 06 * * 1-5 /usr/local/bin/scribe /etc/local/scribe.1.conf 1&2>> /var/log/local/scribe.1.log 00 15 * * 1-5 killall scribe;...
4
votes
2answers
60 views

Best way to ensure that a script is run once a period?

I need a certain script to run once a month (others viewing this question may need it to be run once a day/week/year/5-day, etc). I know I can use cron to do so with: 0 0 1 * * ./script.sh But what ...
-1
votes
2answers
45 views

how can I see if my cron is running and doing the job?

how can I see if my backups is saved after the minute assigned? how can I test it if it's ok?
1
vote
2answers
57 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
60 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
34 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
59 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
72 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
81 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
32 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
37 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
38 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
45 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
1answer
41 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
22 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
28 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
39 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
33 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
78 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
27 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
55 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
52 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
31 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
22 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
36 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
35 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
45 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
39 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
75 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
59 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
57 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 ...