cron is a task scheduler based on clock time that runs on Linux-based machines.

learn more… | top users | synonyms

0
votes
1answer
174 views

Error: bad hour; while reading /etc/crontab

My crons are as following, the error in /var/log/syslog is the title of the post. # week */2 12/1 * * 1-5 tills13 python3 /home/tills13/script.py --sync 1/2 12/1 * * 1-5 tills13 python3 ...
0
votes
1answer
123 views

Cron strange behaviour

I've got a Bash script with all the permission to be excecuted, I attach it to to a cron job, this script basically only kill and restart a specific process, the strange behaviour is that if i run the ...
1
vote
3answers
306 views

Is there a program in Linux which will execute a command and send an email if it fails?

I have a process which is started by Сron like this: timeout 1h /app/longprocess.sh Now I want to be notified by email if something goes wrong with it. Imagine this: notifyme ...
0
votes
0answers
33 views

I want to run a script that will disable my touchpad

I want run a script that will disable my touchpad and it will run every minute. 1. My script is: if [ `lsusb | wc -w` == '76' ] then `/usr/bin/xinput set-prop 16 "Device Enabled" 0` else ...
0
votes
0answers
19 views

How can I give time restricted access to certain Jenkins builds?

I have a Jenkins cluster for automated builds. I would like to let our developers run some builds to one of our UAT environments. However, builds from the developers should only happen when I'm ...
1
vote
1answer
70 views

BASH - Script isn't executing

I have a bash script, which checks a .txt file once a minute, and calls another script, if necessary. I am using cron for this, and this is in root's crontab; * * * * * ...
0
votes
0answers
202 views

Cron does not start: '/var/spool/cron' is not a directory, bailing out

I have an LXC container (The LXC host is Debian 8.1, and the container is Debian 4.0) running mysqld, sshd and a few other things. However, cron does not come up. $ /etc/init.d/cron start Starting ...
0
votes
1answer
62 views

Issues running ruby script as cron job

I have a ruby script which i want to run as cron job.It runs perfectly fine when i run through command prompt on a linux machine. But when i run that same script using a cron job it fails. I get ...
0
votes
0answers
10 views

Configure Cron log to show job number

I have several PHP cron jobs. Occasionally these jobs abort, logging with the appropriate process id etc. However the job number isn't included in the abort log message. Is there a way to configure ...
0
votes
0answers
53 views

How to determine what is updating my freedns/dyndns record with my current IP (on OS X Yosemite)?

Somehow, a while ago, I set a way to automatically update my DynamicDNS record on http://freedns.afraid.org/ with my Mac IP address. I don't remember how I set this or where should I look to disable ...
0
votes
0answers
29 views

High load after killing processes

My Linux home server (a RPi 2 with Raspbian) had a script running every 5 minutes from a cron job (an old rpi2pachube.sh). It usually runs a Transmission daemon. I just discovered that that script ...
2
votes
2answers
95 views

How do I kill one cron job before executing another one?

In the crontab -u pi -e of my digital picture frame I have got two processes. The first one calls feh on reboot and starts a slide show. @reboot bash /home/pi/ledslide1.sh >> ...
2
votes
1answer
107 views

Crontab command not executed

I have a command in my crontab that doesn't execute correctly, this should backup the database everyday at the specified time. I tried running the command in my terminal and is working properly. To ...
1
vote
0answers
93 views

Output redirection of cron jobs to an external file

I have been trying to redirect the output of a cron job to an external file but to no avail. I am using CentOS 7 headless. I created a small script to execute two commands. The script in itself ...
0
votes
1answer
204 views

Problems running nmap export to file in linux as a cron job / bash script

I have a very simple bash script that runs nmap and exports the results to an xml file, and the uses scp to upload the file to a server: #!/bin/sh nmap -sn -oX /home/scan.xml 192.168.20.1-255 wait ...
0
votes
1answer
153 views

cron job does not wait end of process

I made a script which execute commands and others scripts. Some of these actions take time. When I execute my script manually from the cli, it work fine waiting the end of each instruction before go ...
1
vote
1answer
139 views

How to configure a cron.d crontab file for root

What's the procedure for installing a cron.d crontab file to be run as root? I have a script I want root to run every 10 minutes, so I installed the file /etc/cron.d/mycron: SHELL=/bin/bash ...
0
votes
1answer
96 views

Encrypted folder mounted by a cron job, won't keeps mounted

I have an A.sh script that queries a server; retrieves the mount password and mount the Private folder in the client. Then I have a Init.sh script that first check the internet connection status and ...
0
votes
0answers
40 views

Red Hat Linux Cron Daemon Time Error

I have a legacy system that is running Red Hat Linux 5.4 and the cron daemon will not start. It stopped suddenly, I verified the CMOS time and the system time are correct. I've tried resyncing with ...
0
votes
1answer
180 views

Error while trying to execute cron script with space in path

I have a script with several rsync commands in it. The script file is placed in an NTFS partition with owner and group permissions set to root. I have no problems running the file manually from the ...
0
votes
1answer
40 views

Can cron job add some information to cron log?

I am running OSX 10.10.4 and have a cron job scheduled there (it runs python script). Log file is enabled there in accordance with this answer - http://superuser.com/a/595825/172606. But the log ...
0
votes
1answer
28 views

Does a cron daemon drain a laptop battery significantly faster?

I would like to run a small script every hour to change my wallpaper. Does running a standard cron daemon (like fcron, cronie) cost a disproportional amount of battery lifetime? I would not expect ...
2
votes
1answer
122 views

how to get cronjob running every minute

I am following advice on crontab usage online, and I ran sudo crontab -e, and my cron file is: MAILTO=cchilder@mail.usf.edu * * * * * ...
0
votes
1answer
34 views

Service to restart (safely, then if that fails, forcefully) a few different processes on a schedule

I'm currently running a personal project that basically monitors a few things around the clock. One is a process that uses PhantomJS, and the other scans some other APIs, and sends emails if some ...
0
votes
1answer
63 views

I am trying to run a cronjob but it is not executing correctly

I have the following line in my crontab */1 * * * * /usr/bin/screen -S lftp /bin/bash /media/c419d280-9833-4432-b5a5-520f040b87ec/NASDataDisk1/Other/autolftp-sftp.sh >> ...
1
vote
2answers
2k views

Crontab command cannot be executed. Error PAM configurations

Here's the command that I would like to execute but it seems not to work. [mdubois@veloce ~]$ crontab -l Autorisation refusée You (mdubois) are not allowed to access to (crontab) because of pam ...
2
votes
1answer
254 views

Cron Command for twice a month on Sat @12am

I am wondering if someone can help with the simple but sometimes confusing commands regarding Cron jobs. I would like a cron job to run twice a month on a Saturdat @12am.
2
votes
2answers
85 views

Anacron, execute job as many times as it has been missed

If I schedule a job to be run at 3 A.M. every day and it is missed 3 days in a row, will Anacron execute it 3 times when the system comes back running, or only once ? If it is only run once, is there ...
0
votes
1answer
27 views

Cron file in cron.d isn't running at all, why?

I am unable to run my cron file stored at /etc/cron.d but it wouldn't run for unknown reasons :/ can someone please help? Content of my cron file is as follows: ...
0
votes
1answer
73 views

Start Script Even When Mac Sleeps

I wrote a a python script to check the tmperature via API call and then change the color of my Philips Hue Lights regarding temperature and rain. The only problem I'm facing is that the whole thing ...
0
votes
1answer
311 views

Debian - How to get this job in cron.d to run at startup

Using Debian Jessie, I'm having trouble running a one line file I placed in /etc/cron.d The file contains the following line: @reboot myuser /usr/bin/keepass2 /home/myuser/mydb.kdbx -pw:password It ...
0
votes
1answer
14 views

Troubleshooting CRONIC/CRON causing 'No such file' Error

I've got a couple of Cron jobs setup that I have piped through Cronic so that I only get emailed if there is an error. Whenever I run the command in a terminal without Cronic the command executes ...
0
votes
1answer
584 views

Every 5 min cron job between specific time (Windows server 2008 and batch file)

Previous colleague set up cron job every 5 min for 24 hrs. Now I need to modify this only running between 7am to 7pm. I had never learned cron job so I googled and tried but it didn't work. Task ...
1
vote
2answers
745 views

Crontab + Forever + node.js + NPM

I cant put my crontab to work. I'm on Ubuntu 14.04x64 So, this is what I did: .root .pw .sudo apt-get update .sudo apt-get install nodejs .sudo apt-get install npm .curl ...
2
votes
1answer
152 views

cronjob opening then IMMEDIATELY closing ssh tunnel

I'm trying to write a script that would open an SSH tunnel to a public-facing server. I've got everything written and working correctly, but the connection doesn't seem to be making it to my server. ...
1
vote
1answer
180 views

scheduling with cronjob to run the php file for only one time

How do I run the php file only once using the cron jobs. i.e., to schedule task to work on 20/06/2015 10:30:00 I tried something like this : 30 10 20 6 ? 2015 /usr/bin/php ...
0
votes
1answer
240 views

Logrotate not rotating my logs

Running on Ubuntu 14.04, I have the following logrotate config under /etc/logrotate.d/logstash /opt/app/logs/logstash*.log { size 1g create 700 app app rotate 5 } This log ...
2
votes
1answer
115 views

How to make cron perform task every hour during business hours?

I'm trying to make a script run twice every hour during business hours on weekdays, and i have the following in my cron setup: # m h dom mon dow command 8,48 8-17 * ...
1
vote
1answer
541 views

Starting script in screen with cron

I apologise if this has been asked before but I am not sure how to question a search query for this. I am extremely new to linux and I have been learning as I go to solve issues. I am trying to set ...
0
votes
2answers
57 views

Database backup bash working via ssh but not in cronjob

I've put together a script to backup my database on a shared host. The script is as follows: mysqldump --databases [db1] [db2] | openssl aes-256-cbc -a -salt -pass ...
1
vote
2answers
2k views

cron expression for every hour starting from specific time

Every one hour (starting from "now") I am able to schedule using this cron expression (expression) using nodejs cron-job. But I need to set cron every one hour starting from a specific time. For ...
1
vote
1answer
528 views

Using anacron in cronie on Gentoo - Doesn't run?

This is the system crontab on a Gentoo system with cronie installed, with the anacron use flag enabled: 59 * * * * root [ ! -x /etc/cron.hourly/0anacron ] && rm -f ...
1
vote
2answers
94 views

Running executable from Crontab

I have a file called Exim_queue_size in the root directory. It contains one line: exim -bpc | mail -s'Exim_queue_size' bert@example.com It has had its permissions set with chmod +x , and is thus ...
1
vote
0answers
117 views

cronjob + upstart for a node.js script

I can start my node.js script as a process like so: start demo because in /etc/init/demo.conf i have: respawn respawn limit unlimited exec node /home/engine/private_js/demo.js >> ...
0
votes
1answer
166 views

Infinite loop of cron jobs with intermediate output from each job

I have a program that outputs stuff to standard output. I am using cron to schedule it which is fine because I am collecting the stuff that it prints outs via email and do some statistical work on ...
0
votes
1answer
138 views

cron jobs are stopped running

I have cron job that run every 5 minutes in my red hat machine. 2,17,32,47 * * * * root /usr/sbin/logrotate -s /var/opt/swms/log/logrotate.status /opt/swms/etc/logrotate.d/syslog After running for ...
0
votes
1answer
38 views

cron job to run for last few days of month (possibly into next)

I'm trying to setup a cron job that will run from the 29th, for 4 days each quarter (Jan/Apr/Jul/Oct). I've setup the following… */10 6-17 29-31 1,4,7,10 1-5 php script.php */10 6-17 1 5 1-5 php ...
1
vote
0answers
62 views

Stop automatic comments in my crontab

I have added the bellow cron jobs in my crontab : 0 5 * * * /bin/systemctl restart gb_subagent.service 28 13 * * * /home/comment.sh &>/tmp/errorcron.log 29 13 * * * bash ...
0
votes
1answer
62 views

Remove orphaned data without corresponding torrents in the rtorrent's list

I use rtorrent with a plenty of frontends like ruTorrent and Transdroid. Often, when I try to delete both the torrent and data through these frontends, the torrent is removed from the list but the ...
0
votes
1answer
72 views

Accidentally deleted all files older than 7 days

A bad written skript located in /etc/cron.daily erroneously executed find * -mtime +7 -exec rm -r {} \; as root user. As a result of this I can no longer login. Beside that the system seems to run ...