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

learn more… | top users | synonyms

0
votes
1answer
25 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
23 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
41 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
9 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
8 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
12 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
64 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 ...
0
votes
1answer
15 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 ...
1
vote
1answer
159 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
20 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
40 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
53 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
32 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
28 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
0answers
41 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
243 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
216 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
63 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
67 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
70 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
140 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
45 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
21 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
28 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
124 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
25 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
332 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
504 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
67 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
68 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
49 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
66 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
76 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
26 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
141 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 ...
0
votes
1answer
29 views

install crontab every 10 minutes

I'm following the tutorial here on how to install a crontab every 10 minutes, but I'm running into an issue. My Cron is */10 * * * * /app/qa/dashboard/ec2/autoscaling-onesearch/manage check But ...
1
vote
2answers
173 views

Restarting process in CentOS if server restarts

I have a VPS with some Java applications (made with "Play Framework") running on ports 9000, 9001, 9002 and 9003. VPS Provider (iPage) happens to reboot servers unexpectedly from time to time, leaving ...
0
votes
1answer
37 views

Cronjob etiquette?

I am a student at a relatively small university. I wrote a script that sends me an email when a math newsletter comes out, so I can get a head-start on the problem of the week. I plan to run it as a ...
0
votes
2answers
39 views

Write PID To File On Bash Execution

I'm executing a bash script via cron. I want to write the process id (PID) of the script to a /tmp/ file for reference, in case I need to kill it later on (this script can take 6 - 10 hours to ...
0
votes
1answer
60 views

Strange timing behaviour

I need to run a CRON each 5 minutes for a specific user example.com, the script executed is a php file. File : /var/spool/cron/crontabs/example.com /5 * * * * /usr/bin/php -f ...
-1
votes
1answer
159 views

Double pipe “||” not working in cron jobs

fellow SUers, I am trying to run a watchdog cron job to make sure a process is running (DreamHost keeps killing processes). I was inspired by this SU question. However, the double pipe || seems not ...
0
votes
1answer
120 views

Can't create incron job

I am trying to create incron job, but no success. When I type: incrontab -l I got: no table for vujke and when I type: incrontab -e I got: editor finished with error: No such file or ...
0
votes
1answer
61 views

Cron jobs on IBM i 7.1

I just found out today that on an IBM i system I am able to use SSH to get to a Unix-like terminal (AIX/PASE) and would like to use this to schedule automated tasks using crontab. Does anyone know if ...
0
votes
1answer
219 views

How to get crontab to run when backup requires a password

I am running a script to backup my postgres database on Debian. I am basically running exactly this: https://wiki.postgresql.org/wiki/Automated_Backup_on_Linux Now I have everything working fine when ...
0
votes
0answers
52 views

Maintain screen session when executing shell script on boot

Solved: I solved this problem by introducing a delay before executing the script: @reboot sleep 60; /root/start_server.sh On Ubuntu 14.04, I have a crontab entry set to run on reboot: @reboot ...
0
votes
2answers
73 views

Synchronized script execution across multiple servers

I'm looking to run an automated task (a shell script) on multiple Ubuntu servers at the same time with as much timing accuracy as possible. Ideally, I'd like the time discrepancy between the start of ...
1
vote
1answer
45 views

cron jobs set for different times, but execute at the same time

I have a file which I loaded into crontab with the following jobs, and crontab -l reports the following: # runs daily at 2:00 am and 2:05 am 30 12 * * * /usr/bin/wget -q -O temp.txt ...
0
votes
1answer
130 views

Daily crontab with hg, git and svn

Hello I have made a script that updates some repos from git merc and svn, then updates a git repo. The script works manually but doesn't work in crontab, here is the script: #!/bin/bash cd ...