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

learn more… | top users | synonyms

1
vote
0answers
14 views

Skip syslog/rsyslog logging of certain cron jobs [migrated]

In most GNU/Linux distributions the default is to log start (and many different events) of every cron job to syslog. It's rather convenient, but not for a very frequent jobs, which started, say, every ...
0
votes
2answers
24 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 ...
0
votes
2answers
22 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 ...
0
votes
0answers
7 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
21 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 ...
0
votes
0answers
10 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
22 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
22 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
19 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
21 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
0answers
16 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
59 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 ...
0
votes
1answer
20 views

my cron job was running properly but suddenly it stopped executing and I get entry in cron log file as (CRON) Bad Minute. Please help me out

Here's my cron job 00 02 * * * /usr/bin/wget -q http://alaska/samuel/batch/JOB_daily_attendance.php Here's log entry in cron log file crond[26113]: (CRON) bad minute (/var/spool/cron/roots)
0
votes
1answer
26 views

Cronjob: Iterate through files

I want to iterate through a list of bash scripts with a cron-job. I.e. every two hours I want to start another bash script. My idea was to set a new environment variable, each time the cronjob script ...
0
votes
0answers
27 views

etherwake fails to run when ran by cron

I have a cron job to check if a client is connected to my VPN and then wake up some other computers on my network using etherwake. I have the script running every minute and it is actually running ...
0
votes
1answer
53 views

cronjob not executing python script - tried strace

I'm having trouble making a python script run via cronjob. I can run the python script (it's supposed to connect to a database, pull a few records, save that to a csv, then email it) manually just ...
0
votes
0answers
19 views

Synology jailkit debian cron debootstrap

I have a Synology NAS. For advanced using of my server, I installed a debian with chroot-jailkit and debootstrap. I follow those instructions (in french sorry) This is working really fine. I have ...
0
votes
0answers
16 views

aptitude safe-upgrade: apache2_invoke : already enabled messages

On my Ubuntu 14.04 LTS server I run unattended upgrades using that script in /etc/cron.daily: #! /bin/sh PATH=/usr/bin:/bin:/usr/sbin:/sbin export DEBIAN_FRONTEND=noninteractive date >> ...
0
votes
0answers
14 views

Setting a CRON to be run on every 1st and the 3rd Monday

I need to set up a CRON job to be scheduled in every 1st and the 3rd Monday of every Month. I'm using the Plesk control panel for setting these as follows. Currently CRON runs successfully, ...
0
votes
1answer
71 views

automatically start netcat on localhost and remote-host and keep it active

I found this answer by @jeremytrimble on Stack Overflow which explains how you can read a FIFO file over network. I wonder if it’s possible to start these netcat commands automatically, e.g. in a ...
1
vote
1answer
20 views

Running a script if X server haven't been receiving any input for some time

I want to run a certain script when I'm not around my machine so it would run automatically but it would not bother me when I'm working. I created the bash script and queued it with cron, but it ...
2
votes
1answer
180 views

GUI applications in anacron

I'm trying to run a bunch of scripts/commands every day. For this purpose I've configured a user-space anacron as explained here. Anacron is started hourly by cron: contents of ...
0
votes
0answers
30 views

Using ulimit with cron jobs

I'm having a hard time understanding how to use ulimit to manage process resource allocation. It looks like you use ulimit to limit a user's resources, but how do you use it on a specific process? In ...
0
votes
1answer
43 views

Programs for contolling the execution of bash scripts [closed]

Can anyone recommend a GUI based program to control the execution of bash scripts according to time/interval? I'm already familiar with both cron and at and looking for recommended alternatives. A ...
1
vote
2answers
84 views

logrotate in SUSE Enterprise Server

I can't manage to work this dummy config file (I placed it in etc/logrotate.d): /var/log/test_log/mylogfile { copytruncate dateext rotate 3 compress missingok size=+2 } I write to the log (echo ...
0
votes
1answer
36 views

Why doesn't my script run via crontab?

I have this teamspeak server that has a bad habit of crashing sometimes. Therefore I would like to run a script every 5 minute so the server can restart even if I'm not home. I got this script, and ...
0
votes
1answer
36 views

How to use variables in variables in crontab

I'm trying to use variables in variables in crontab: AUTH=user:password BASE_URL=http://... COMMAND_OLDB=curl -u $AUTH $BASE_URL/openligadb >> /var/log/cron.openligadb.log But just getting a ...
1
vote
1answer
75 views

How to set up flask server startup?

I have a web-server that is based on flask+tornado combination. It works inside of a virtual environment (set up with python virtualenv). I want the server to launch automatically on start up, from a ...
1
vote
1answer
255 views

How to set an offset for cron jobs?

I have seven scripts to launch that take quite long to process, so for my first idea, I wrote my crontab like this: 0 */3 0 0 0 /home/personal/my-script-1 0 */3 0 0 0 /home/personal/my-script-2 0 */3 ...
1
vote
1answer
441 views

Why does root cron job script need 'sudo' to run properly?

I'm running this simple script on my Raspberry Pi to auto update so I can forget about it. It also keeps a log that says whether the update was successful. The script is update.sh: #!/bin/bash echo ...
0
votes
1answer
22 views

Incron Job is not being executed

I am using incron to monitor one of my file in /var/www/html directory. output of incrontab -l /var/www/html/test IN_ACCESS /home/intel/test.sh This job is supposed to create a file in home ...
1
vote
0answers
94 views

which mail program will be used in crontab?

Platform: Ubuntu 12.04 LTS User: root Desc: If there is any output to stdout/stderr in execution, crontab will collect them and mail to correspond owner. In my case, it is 'root'. When I look at ...
0
votes
1answer
91 views

How can I make cron to email report audit only if there is something to report?

I setup daily cron job checking if files have changed previous day, since those files are not suppose to changed i'm getting empty report, how can i change it to send email prevent this. this is my ...
0
votes
0answers
79 views

Unable to run script, which emails me results, as super user. (returns: send-mail: 550 5.1.0 Not our Customer)

I have been trying to debug this for 2 days now, without success. This is the script I'm trying to run: #!/bin/bash emailaddress='my_username@gmail.com' output=`sudo rsync -av --delete ...
0
votes
1answer
172 views

Regex for cron pattern not working

Tried to create a (simplified) regex for cron patterns for myself and came up with the following one: ^(((\d+(,\d+)*)|(\d+-\d+)|(\*(\/\d+)?))(\s+(\d+(,\d+)*)|(\d+-\d+)|(\*(\/\d+)?)){4})$ This is ...
0
votes
0answers
56 views

How to backup DD-WRT router settings periodically?

Simple question from a Linux beginner, how do I backup my DD-WRT router's settings, for example, weekly or monthly? Router is a TP Link WR1043ND. I'm not sure what other details are required from ...
1
vote
0answers
22 views

Sample cron job run but gave errors

I have sample script that backup my site. www folder and database. When is running It's get this error tar: unrecognized option `--transform' Try `tar --help' or `tar --usage' for more information. ...
0
votes
0answers
35 views

CRON @reboot vncserver?

Is there any reason per-user cronjobs running vncserver @reboot wouldn't run? When I reboot the machine and look into /var/log/syslog, I see the jobs being run, then cron saying (CRON) info (No MTA ...
0
votes
2answers
147 views

Cron Job not running in Ubuntu 12.04

I created a cron job in my console in Ubuntu 12.04) by using crontab -e: 10 09 * * * /home/ram-pc/Desktop/bala/personal/dump.sh But it is not running. When I save it is installed correctly without ...
0
votes
1answer
29 views

Logrotate not rotating on file size

According to the man page "Normally, logrotate is run as a daily cron job. It will not modify a log multiple times in one day unless the criterium for that log is based on the log’s size". So, ...
0
votes
2answers
18 views

Install cron from console

Is there any way to do the crontab -e, save and exit from vim from the console directly? I realised that in order to make cron work with Docker, I should do crontab -e and save and exit, that is the ...
4
votes
2answers
439 views

Behavior of rsync with file that's still being written?

If Apache is in the middle of writing a large file and an rsync cron job runs on that file, does rsync attempt to copy the file? Example Apache-1: Has file large being written to /var/www. ...
0
votes
1answer
599 views

Cron won't run my root script

I am on Ubuntu 14.04 (using Digital Ocean) trying run a script as root. It's a script to check if a server is running and restart if it has crashed. The issue isn't the script, but crontab won't run ...
0
votes
0answers
72 views

Delete messages in Gmail “All”, “Incoming” or “Sent” folder

I use one Gmail account only for mail relaying from my home server to different accounts, to multiple users. The problem is that there are some thousands of emails on this account in the "Sent" and ...
0
votes
0answers
75 views

Not able to open crontab -l

I am running crontab -l to view the crons on a RHEL server(v5.10) and getting the below error: crontab: error while loading shared libraries: libaudit.so.1: cannot open shared object file: No such ...
0
votes
0answers
51 views

How do I launch a gui app from a script called in cron in Linux?

I understand that cron doesn't like launching apps that have a gui. I am trying to google around this, and I found that it is possible, but I need to tell cron which display to launch it in. Well, I ...
0
votes
1answer
76 views

Where is the default directory of saved files using wget in crontab?

I want to download some files using wget command in crontab. I use a text file to make a list of my desired urls. wget's -O parameter works well for setting a destination folder for single files, but ...
0
votes
1answer
81 views

cronjob not uploading to FTP

i have a php script that should take a file from one web server and upload it on another, when i run the script through a browser it works fine. when i use this cronjob it doesn't upload. 51 14 * * * ...
0
votes
0answers
29 views

Emails from root while working with Horton Sandbox

I recently installed the VM for Horton Sandbox (CentOS 64) and I consistently get the notification: You have new mail in /var/spool/mail/root and when I go there I see notices of the form: 22 ...
0
votes
0answers
153 views

Correct crontab settings on Cpanel/WHM Cron on CentOS 6.5

I have recently migrated from collocation to Amazon EC2 and setup new WHM installs with CentOS 6.5 I then used the Transfer tool to move all websites to the new server, however I am trying to transfer ...