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

learn more… | top users | synonyms

3
votes
1answer
3k views

Two parts: linux startup script to connect to bluetooth and cron to keep it connected

I have a mini bluetooth keyboard and a Raspberry Pi running a Debian-based distro. I know the MAC address of the keyboard but for this question, let's just use AA:BB:CC:DD:EE:FF. Right now I have to ...
0
votes
1answer
16 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 ...
0
votes
1answer
274 views

Crontab command set not working

I'm trying to set up crontab to run a shell script, but for some reason, the script doesn't get executed. I'm on system with OS X 10.8.5. crontab file 0 12 * * 1 /absolute/path/to/myscript.sh 0 15 * ...
11
votes
9answers
8k views

Error adding cronjobs in Mac OS X Lion

Until now, I have never attempted adding a crontask on my Mac. To my surprise, it threw an error.. [hayek@mac:/www/] 02:33:22 PM: crontab -e ...
1
vote
0answers
19 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
11 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 ...
1
vote
1answer
52 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 ...
0
votes
1answer
55 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
17 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)
36
votes
4answers
17k views

Log of cron actions on OS X

Does the cron which comes with OS X log its actions anywhere? I'm not looking for output of any particular cron job, but rather log of what cron is doing. On a couple linux machines I've checked, ...
1
vote
2answers
541 views

Debian Linux cron stubbornly refuses to run at right time

I have a Debian Linux server, recent install. It has this cron job: 7 1 * * * /do/something/important.sh As I read that, it should run at 1:07am. Instead, it runs at 5:07pm. So, wrong ...
22
votes
6answers
32k views

How can I view results of my cron jobs?

I see so many guides on how to run crontab, but what I need right now is to learn how to Find log files about cron jobs Configure what gets logged
13
votes
4answers
23k views

How do I run a launchd command as root

I have the following launchctl command as a .plist file. It's loaded and set to run once a day but, it needs to run as root and I'm not sure how to verify this. Also, this cron job basically CDs ...
1
vote
2answers
4k views

How to auto commit to my git repository using cron?

I look into a lot of answers about this subject, but something is wrong here, let me explain. I create this script, to make my cron cleaner :) #!/bin/bash cd ...
1
vote
2answers
197 views

How do you use the run-parts command?

For some reason my crontab is not running the hourly/weekly/etc scripts. It seems to be that run-parts is not working and I cant get it to work on my local machine as well. Is there a mistake in the ...
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 ...
5
votes
2answers
2k views

Delete all files older than X days

So I have a cron setup to make backups of a folder into a tarball every hour. I would like to add into the shell script that I'm using the ability to have files deleted automagically after about three ...
3
votes
3answers
7k views

How can I add a timestamp to the end of a cron job's output file name?

I want to track each crontab output to separated file. Normally, I use this as crontab entry: 1 * * * * root php /mix/dostuff.php > /tmp/dostuff.txt Now, I want to make it to write ...
0
votes
1answer
44 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
16 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 ...
2
votes
1answer
1k views

cron job when Ubuntu is suspended

I am using Ubuntu precise. Is there a way to have scheduled cron jobs run even when Ubuntu is suspended? Perhaps some way to automatically wake up the system so a scheduled cron job can proceed and ...
0
votes
0answers
13 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
1answer
26 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
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, ...
8
votes
5answers
9k views

Run a cron job on the first Monday of every month?

I'd like to run a job from cron at 8.30 on the first Monday of every month. The cron Wikipedia page says While normally the job is executed when the time/date specification fields all match ...
2
votes
1answer
169 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
1answer
66 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
17 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 ...
33
votes
7answers
48k views
0
votes
0answers
24 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 ...
1
vote
2answers
14k views

rsync cron job with a password?

I want to set up an rsync command as a cron job, so I need to find a way to supply my server password automatically to rsync. Currently I have a shell script that looks like this: #!/bin/sh rsync ...
0
votes
1answer
42 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
67 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 ...
5
votes
3answers
5k views

BASH - merge directories when using mv

I just started using BASH, so I can move all contents of a directory to another. But the issue is, I was expecting it to merge the directories. I am using cron job to run this script. #!/bin/bash ...
6
votes
2answers
3k views

Multiple crontabs for one user

is there a way to use multiple crontab files for one user? Thinking something along the lines of crontab file per project instead of crontab per user... Any help is appreciated...
4
votes
2answers
718 views

Shell script of mysqldump works fine when run manually, but does not run in the cron job?

I have a shell script to get a MySQL database dump. This script works fine when run manually #!/bin/sh fqn=/home/Mysqluser/daily_dumps/bookstore_`date +%Y%m%d_%H%M%S`.sql.gz mysqldump -u root -h ...
0
votes
1answer
33 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
31 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
246 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
319 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 ...
0
votes
3answers
2k views

FTP from bash script running from cron not working

I have a script that is run by cron to create backup of a MySQL database and some files. After creating a tar ball and encrypting it with openSSH I have to put it on a remote ftp server. Following is ...
1
vote
0answers
81 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 ...
6
votes
4answers
9k views

Timezone issue with cron

My cron jobs are computed one hour later compared to server time. I don't understand what is going on. My configuration is the following : Server time : Europe/Paris In /etc/default/cron I added ...
0
votes
1answer
77 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 ...
3
votes
2answers
2k views

Debian cron.daily messages

Every week, I seem to be getting the following two Cron messages: /etc/cron.daily/logrotate: gzip: stdin: file size changed while zipping /etc/cron.daily/spamassassin: channel: no ...
0
votes
0answers
75 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 ...
6
votes
3answers
8k views

How to set cron PATH globally (i.e. for all users) permanently?

We need to have /usr/local/bin in cron's path for all users. Is there a way to set it system-wide, without needing to edit each individual user's crontab? We've tried adding PATH to /etc/crontab: # ...
0
votes
1answer
146 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 ...