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

learn more… | top users | synonyms (1)

0
votes
3answers
29 views

Add cron to Crontab

I am looking at these tutorials https://www.digitalocean.com/community/tutorials/how-to-use-cron-to-automate-tasks-on-a-vps and I have cron installed but when I write the command 5 * * * * curl ...
0
votes
1answer
14 views

Getting cron to include Date IN error log

So I have the following Cron job running: /home/ubuntu/scripts/austria/archive.sh >> /home/ubuntu/logs/austria/archive.log 2>> /home/ubuntu/logs/austria/archive.err Every time the scrip runs, it ...
0
votes
0answers
27 views

How to show Java dialog when cron runs the Java program?

I've done a little java program that ends showing a dialog after doing some other tasks like reading from a web and writting on a file. My goal is to make it run everytime my system starts with 90 ...
0
votes
0answers
6 views

Cronjob and Mapcrafter for Minecraft not running the renderer

I am using two Raspberry Pi 2 computers: one to run a Minecraft Server, one to run Mapcrafter (http://mapcrafter.org/index) to setup and update the server's map on my Apache2 server. I am using cron ...
1
vote
2answers
61 views

Cron only occasionally sends e-mail on output and errors

On Debian 8.1, I'm using a Bash feature to detect whether the stackoverflow.com website is reachable: (echo >/dev/tcp/stackoverflow.com/80) &>/dev/null || echo "stackoverflow unreachable" This is ...
1
vote
0answers
16 views

running cron on a chroot

For my web development I use a debootstrap'ped Debian with sysvinit, I start apache2/mysql manually only when I need to work. Now for a new project I require to run some scheduled task for which I ...
0
votes
1answer
24 views

Output date is not proper when the script is ran using cron

The below line should provide an output date which when ran manually gives an proper output like Fri Jul 17 01:42:07 2015. But when ran using cron gives the epoch date i.e. Wed Dec 31 19:00:00 1969 ...
0
votes
0answers
50 views

Script won't run in cron but runs fine in root shell

My Problem: I have a python script that runs fine when run manually but does not complete when run using cron. My script fails in cron because it contains pexpect commands that require an interactive ...
20
votes
2answers
1k views

Can grep | crontab destroy all jobs?

My colleague ran grep | crontab. After that all jobs disappeared. Looks like he was trying to run crontab -l. So what happened after running the command grep | crontab? Can anyone explain?
0
votes
2answers
24 views

Insert Line in Multiples Files

I have a CentOS Server with 200 Wordpress sites and now I want to insert this line in every wp-config.php file: define('DISABLE_WP_CRON', true) I know there exist a "for ... do ... done" ...
2
votes
0answers
27 views

Why a crond can start late randomly

I have this issue of a cron that executes a PHP script at minute 20 every hour, This script generates a small number of reports based on data from a MySql database. Generally this script ends ...
0
votes
1answer
33 views

I cannot kill crond - trying to stop cron service

This is frustrating, I try: service crond status And get this: Redirecting to /bin/systemctl status crond.service crond.service - Command Scheduler Loaded: loaded ...
0
votes
1answer
58 views

Script with curl works manually but not in cron job

My script (status.sh) is: #!/bin/bash SITE=http://www.example.org/ STATUS=$(/usr/bin/curl -s -o /dev/null -I -w "%{http_code}" $SITE) if [ $STATUS -eq 200 ] then echo $STATUS >> ...
1
vote
1answer
37 views

Prevent ssh-keyscan from generating output

Problem: When running ssh-keyscan in cron it emails me the output of ssh-keyscan every day. The email simply contains the following. # <hostname> SSH-2.0-OpenSSH_5.3 My (simplified) cron ...
2
votes
1answer
45 views

How run free command by crontab

I want to run this command: free && sync && echo 3 > /proc/sys/vm/drop_caches && free -m by cron that why I'm able to free my RAM and cache in ubuntu system. I'm using ...
1
vote
1answer
27 views

Have cron check if the bash script is executing

I have a bash script that users while do along with sleep to constantly monitor the connection state and take measures in case something goes wrong. The only thing that is not guarded is the execution ...
4
votes
1answer
40 views

Does rsync over any type of checksum? [duplicate]

I need to transfer files from several servers to a single remote host using Rsync over SSH. However, I need to be sure that before the file is deleted on the source using the --remove-from-source ...
2
votes
1answer
39 views

crontab versus manual running script

I wrote a script to check for wifi connection that has an "if then else" statement. If I run the script manually the "if" statement is 1, as it should, if the crontab runs it automatically the "if" is ...
0
votes
1answer
25 views

How to make OpenVPN to autoreconnect to gateway at any time

I've recently discovered a built-in way to have OpenVPN to auto connect to VPN gateway on startup, which is via setting profiles .conf files in /etc/default/openvpn as a part of AUTOSTART parameter. ...
0
votes
2answers
27 views

Simple bash not running properly by cron

I created a small bash script that takes a file using wget and then processes it using a php. The code goes like this: wget -U mozilla -P /home/logfetcher/ http://fakesite.com/log.`date -d ...
1
vote
0answers
21 views

How to override email address used by at command

cron has MAILTO setting to explicitly configure the email address that will receive the report Does at have anything of the kind? Man page says it will send using /usr/sbin/sendmail but which ...
1
vote
1answer
56 views

Cronjob is running every minute but not at a specific time

As title says the job works if set like this: */1 * * * * /usr/bin/php /home/test/cron/test.php And if set to something like: 15 20 * * * /usr/bin/php /home/test/cron/test.php it's not working. ...
1
vote
1answer
59 views

Shell Script does not send email from Cron job [duplicate]

I have a shell script which sends email when the disk is more than 80% full; when I run the script as sh -x script.sh or ./script.sh I get an email but when I keep the script in cronjob I do not get ...
0
votes
0answers
21 views

Move files that are 7 days or older, cronjob [duplicate]

I want to move some log files that are 7 days or older to another folder and then delete those files after another week. I'm using logrotate to create a new log file every 2 hours in a folder. I ...
2
votes
3answers
140 views

Shell script executed with cron results in different size file than executed manually

I have a RHEL server that I am running a MySQL database on. I have a Bash script that executes mysqldump that creates a backup file. The backup file created when executing the script directly in ...
0
votes
1answer
23 views

Clear X clipboard using cron [duplicate]

Is there any way I can clear the X clipboard from a cron job? The usual commands for xclip don't seem to work. echo -n | xclip -selection clipboard doesn't work from cron.
0
votes
1answer
42 views

AWS CLI - not working in a crontab

I can run the command aws --version in a script and in the cli. But if I put this command into a crontab it does not work. Crontab: 50 12 * * * aws --version > ~/yolo.swag Error: /bin/sh: 1: ...
0
votes
3answers
30 views

Cron service running but not visible by “top”

I'm on my freeBSD server. Cronjob suddenly stop working. When I run "top" the service is not listed. But when i check "service cron status" , it is running with given PID. I restarted the service ...
1
vote
2answers
70 views

What's the most efficient way to log crontab shell script errors with error occurred time?

A common way to log crontab task errors looks like below: 1 */8 * * * sh /pseudo_path/test.sh 2>> my_err_log It's a concise command, but it can't record the error occurred time, and the path ...
0
votes
1answer
34 views

(SOLVED) how to close epiphany through a script with cron?

I have been making scripts to open and close a speficic website, with a cronjob, on the raspberry Pi. The opening script works perfectly. It is as follows: #!/bin/bash export DISPLAY=:0 && ...
4
votes
2answers
408 views

Mysterious “unable to resolve host” in dead.letter

In the ~ directory of the root user on my debian wheezy server regularly appears file named dead.letter with (currently) the following content: orion : Jul 25 10:17:31 : root : unable to resolve host ...
0
votes
2answers
41 views

Not all shell scripts working with crontab

I know this is a pretty broad title but I didn't know what to start with. Anyway, straight to the point. I have a little VPS I run apache and a Minecraft server on. I don't ever turn it off, but ...
2
votes
1answer
46 views

Hourly cronjob does not work

So just to sketch the outlines of this problem, i made an cronjob that should be executed on each full hour like this: 0:00, 1:00, 2:00. In all the manuals/tutorials i found on the internet they say ...
0
votes
2answers
94 views

Dynamic change of Linux root password everyday

I want to change my root password everyday based on the date. The password will be like a combination of a string and the date. The below code is working fine. echo -e "pass"$(date ...
0
votes
1answer
26 views

CentOS 6 Cron Logging Without Postfix

On a CentOS environment I am setting up, I have no need for email of any kind. I would like to simply disable postfix entirely, however this also disables logging from cron which I do need to have. ...
2
votes
3answers
59 views

Transfering mp3 files from a remote server via cronjob to the RPi without overwriting

I succeded in transfering all files from a folder via ftp from a remote server to a raspberry, but I would like to transfer only new ones. Below is the working script i have. #!/bin/bash -vx ftp -in ...
1
vote
3answers
78 views

Shebang does not set SHELL in cron

I have a script containing: #!/bin/bash printenv When I run it from the command line: env testscript.sh bash testscript.sh sh testscript.sh every time, it outputs SHELL=/bin/bash. However, when ...
1
vote
2answers
94 views

My cron job is not sending an email with any output, I see only a blank email

Can someone please help me here. My cron job is not sending an email with output. While I run the shell script manually it generates an email with output. Here is the script looks like #!/bin/bash ...
1
vote
2answers
58 views

cronjob timing - for every 3 months

I chanced upon this example: 0 9 1-7 * 1 * First Monday of each month, at 9a.m. I am not sure the 1-7 portion which is supposingly to be the dates of each month. Why is it a ...
0
votes
1answer
40 views

NTP issues on Nagios server

Our Nagios server NTP has isn't working right. First here is the issues: root@ccsd-lx-noc03 /var/log> tail -n 10000 messages | grep "NTP" Jul 5 16:19:36 ccsd-lx-noc03 nagios: SERVICE ALERT: ...
0
votes
2answers
27 views

Why can't split cron logfile up from syslog in bangwagong host?

There are two vps ,one is digitalocean ,oter is bangwagong host. All the os on them are debian7. I want to split cron logfile up from syslog with the following same steps. step1: vim ...
1
vote
1answer
38 views

XRandR script runs correctly from command line, fails as cron job

I'm running LXDE on Fedora 21. My script's purpose is to extend the display across two monitors: #!/bin/sh xrandr --output VIRTUAL1 --off --output LVDS1 --mode 1440x900 --pos 1280x124 --rotate normal ...
0
votes
0answers
22 views

Crontab, adding multicommands using && throws bad minute error [duplicate]

This works as a single command, crontab -l | { cat; echo '*/2 * * * * rm /tmp/*.tar'; } | crontab - One more job also works as a single command, crontab -l | { cat; echo '*/2 * * * * echo ...
1
vote
2answers
98 views

How do I scp a file from server A to server B from cron?

I have a file in server A which I am able to do transfer to server B using scp. I need to do this through a cron entry. server B has a password. How do I perform this?
4
votes
1answer
74 views

Should the key for an automatically running cron job that runs over ssh not have a passphrase?

I'm reading an article in Master Linux Now 2013 called OpenSSH: Easy Logins and it uses ssh-agent to allow you to enter a passphrase for your key once, and then you're able to connect to a remote ...
1
vote
1answer
43 views

Floating time cron job

I have a Linux host which I would like to have a cron job run on. I do not shut down this machine. I always suspend it. I want to run a job once a day and I cannot set it for a particular time since ...
1
vote
1answer
55 views

Using cron to start a process on a terminal without using screen?

I want to start a process in a terminal using cron. I want the process to start in a terminal, so that I can continuously see the output of the process on the terminal, and kill it / restart it etc. I ...
-1
votes
1answer
65 views

Starting Debian mono application (that has a GUI) AFTER boot is done [duplicate]

I've been trying to figure out how to start an application after Debian (Wheezy) is done booting up and on an LXDE desktop session. It is a mono C# application. The script I have is simply mono ...
0
votes
1answer
33 views

Want to use find with rsync in script

I'm trying to make a script that will run in cron, that will search a path for specific file name. In the path there might be more folders with that same file name. If found and they are newer than 2 ...
0
votes
2answers
54 views

Start daemon process from cron job

I have been trying for a few hours to do the following (on Centos 6): cron starts process A process A checks if process B is alive if process B is not alive, process A starts process B The ...