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

learn more… | top users | synonyms

0
votes
1answer
16 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
11 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
15 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
31 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.
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
2answers
22 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
48 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
11 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
38 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
15 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
6 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
87 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
55 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
38 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
35 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
286 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
930 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
32 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 ...
46
votes
7answers
96k 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
81 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
31 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
70 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
468 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
31 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
33 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
25 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
20 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
39 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
35 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
21 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
293 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
20 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
122 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
61 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
23 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
556 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 ...
27
votes
6answers
35k 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
15
votes
4answers
24k 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
225 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
27 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
46 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
8k 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 ...