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

learn more… | top users | synonyms

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 ...
0
votes
1answer
10 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 ...
1
vote
1answer
58 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 ...
0
votes
0answers
23 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
32 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
21 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
15 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 ...
1
vote
3answers
2k views

Simple Linux-based task scheduler with job dependencies? [closed]

I'm maintaining a data-warehousing system that involves a lot of dependent jobs (data import, transform, etc). I've been using Linux's crontab to manage them until the dependency between jobs get ...
2
votes
1answer
47 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
24 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 ...
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

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 >> ...
0
votes
1answer
24 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
2answers
69 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.
0
votes
2answers
24 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 ...
2
votes
1answer
55 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 * ...
0
votes
1answer
16 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
45 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
18 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
0answers
7 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
109 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
1answer
64 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 ...
1
vote
2answers
65 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
42 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
298 views

How can I run a Cygwin command (not a Windows native command) as privileged?

If I open a (elevated via UAC) Bash Shell in CygWin: Luis@Kenobi /cygdrive/c/Windows/system32 $ crontab.exe -l -u Luisito must be privileged to use -u Tested on WinXP-SP3 and Win7-SP1. Same results ...
4
votes
3answers
944 views

From what context is a cron task executed?

I am asking this question after royally destroying a Linux box. Let me give you some background so you know where I am coming from. I currently have (well... did have) a RedHat Linux box running ...
3
votes
3answers
7k views

how to run cron jobs on GMT not local time?

How can I make cron jobs run on GMT, not local time? this is my crontab file: #m h d m wday command TZ=GMT 5 0,6,12,18 * * * ~/Documents/bash/transfer.sh my jobs seem ...
0
votes
1answer
45 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 ...
47
votes
7answers
98k views

Run a command every week with Cron?

Simple question- what would a crontab entry look like for a command I want to run every week on Saturday at 8:05 AM?
5
votes
3answers
6k 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 ...
1
vote
1answer
103 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 ...
9
votes
2answers
9k views

Why doesn't my cron.d per minute job run?

I have thrown a bunch of darts trying to get a python script of mine to execute every minute. So I thought I'd simplify it to just do the "simplest thing that could could possibly work" once per ...
0
votes
2answers
34 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
132 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
2answers
478 views

Cron job for moving directories older than 24 hours

Well, what I want to do is The cron should run every hour or so It should move the directories in a folder /disk1/data/ older than 24 hours to /disk2/data/ The directories moved should contain all ...
1
vote
2answers
34 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
29 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
25 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
45 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
47 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
28 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
300 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 * ...
13
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
23 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
23 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
155 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
63 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
30 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)
38
votes
4answers
18k 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
559 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 ...