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

learn more… | top users | synonyms

1
vote
0answers
69 views

setting a cronjob in IST time [closed]

I am trying to set a cronjob run in a different timezone..i have goolged a lot and found editing /etc/default/cron is the way to go...but this file is deprecated and I see the following message,so I ...
0
votes
1answer
817 views

Can I use cron or launchd to run a bash script without being logged in?

I'd like to have a simple bash script run (regardless of whether anyone is logged in or not) akin to putting it in /etc/cron.daily/ on Linux, but on Mac OS X Mountain Lion 10.8.4. If it's possible, ...
0
votes
1answer
83 views

Reset user password on reboot

Humor me for a moment because I'm aware that this is a terrible idea. I'm trying to devise a way to reset a user's password each time the computer is rebooted. So far, I've tried the following to no ...
0
votes
3answers
703 views

How to schedule/unschedule cron job from shell

I have a ubuntu server where I put my application core. It's a jar that needs to be always listening for requests. I made a script to run it with the correct parameters. The scenario is similar to ...
2
votes
1answer
663 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
3answers
370 views

Run crontab non-interactively from script

I would like to schedule some tasks on remote servers by script but am having an issue with crontab expecting to be run interactively the first time. As far as I understand crontab needs to be ...
1
vote
2answers
2k 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
809 views

apache crontab not executing

I use cron to execute some php scripts (owncloud background tasks etc). My server runs nginx and PHP via php-fpm, which by default runs PHP processes under the apache user, the only user with write ...
0
votes
3answers
174 views

Automatically Create text file of folder contents

I have a set of directories that have files in them for use with LiquidSoap for use with IceCast2 Currently, every time I remove a file or add a file, I have to edit the txt file listing the mp3s to ...
1
vote
1answer
32 views

Persistent outgoing connection from firewalled Linux box

There's a great method to allowing one to access a machine behind a firewall by creating an outgoing listening connection: Remote into Linux workstation behind a firewall My question is, what's the ...
1
vote
2answers
383 views

Script for transferring files over the internet via a Cron task

I want to add a bit to a backup script that will transfer a file to another server, over the internet. My cron currently does a pg_dump of a database into a file on the local machine, I want to then ...
-2
votes
1answer
321 views

changing ownership of files within a bash script

I have this bash script which outputs the first two files as owned by user, and the next three as owned by root: ################################################## # Variables NUM="6" #number of ...
2
votes
1answer
153 views

Running Redshift commands from crontab, doesn't work

About redshift: Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night. A typical ...
5
votes
1answer
209 views

Why does cron only offer minute granularity?

It feels like there are use cases for things you'd want to run once every 5 seconds, twice a minute, etc, but these are impossible with cron. Why hasn't second-level cron granularity been built into ...
0
votes
2answers
427 views

How to setup muliple cron job every 3 hours but not simultaenously?

I need to run cron jobs during the following times: 1st job: 1PM 4PM 7PM etc.. 2nd job: 1:15PM 4:15PM 7:15PM etc.. 3nd job: 1:30PM 4:30PM 7:30PM etc.. As you can see each job run every 3 hours but ...
0
votes
1answer
855 views

ntpdate command not found [only when using with cron]

I have a linux machine with ntpdate installed and it is working when i run it from my ssh terminal or from a shell script manually. However , when i add the shell script to crontab i get the error ...
0
votes
1answer
113 views

Does cron still run for disabled users?

If a user is disabled (with passwd -l user) on a server, are their cron jobs also disabled? Or would they still run?
2
votes
2answers
482 views

Working with git via crontab

I have the following shell script #!/bin/bash REPODIR=$HOME/work/repository/ cd $REPODIR var=`git fetch --dry-run 2>&1` echo $var > $HOME/error.txt I want to run my script every minute, ...
1
vote
2answers
372 views

os.popen returns empty string when called from cron

I'm trying to get my Raspberry Pi's CPU usage like so: def get_cpu_usage(): return os.popen("top -n1 | awk '/Cpu\(s\):/ {print $2}'").readline().strip() When executed normally, this method ...
1
vote
2answers
333 views

Cron to run command once a day, no mather what time

I want to run a cron command only once a day but not at a specific time as the times my computer is on are unpredictable. Can I do it?
1
vote
0answers
74 views

Enabling crontab logging on openSUSE

I am trying to enable the crontab log on openSUSE 11.3. I searched the web but couldn't find how to do it. I only find information about Ubuntu. Tried editing the /etc/rsyslog.d/remote.conf file but I ...
1
vote
1answer
135 views

cron executing twice based on day of the week

I have a question. We have a cron job that executed on the 15th of this month: min hr day month day_of_week 35 13 15 6 6 However, it executed again on June 22nd (which was the 6th day of the ...
1
vote
1answer
735 views

How can I set a system wide PATH-variable for cron on Centos 6.4

I'd like to make sure that every user specific crontab has the same PATH-environment. I tried to set the PATH in /etc/crontab but it seems like this config file is not read by crond. Following are ...
1
vote
1answer
113 views

How can I conditionally start a service based on the current local time using Mint Linux 15?

I have set up cron jobs which stop services at 2:00 AM and then restarts them at 8:00 AM. However, my enterprising users (my family; securing the box isn't a possibility) have determined that if they ...
1
vote
1answer
47 views

Directory permission with crontab

I have a directory my_website/public, which I did chmod 777 on. I set up a cronjob to delete all the files in my_website/public/photos/* But I got an email notification saying that rm does not have ...
0
votes
3answers
116 views

OsX Crontab having no effect

I am dynamically appending cron tasks to the user crontab The tasks seem to be getting adde, crontab -e looks like: */10 * * * * /bin/sh /Users/john/Kiosk/app/content/update.sh @reboot /usr/bin/open ...
-1
votes
0answers
112 views

Remove expired cron jobs from quartz schedule [closed]

I have some quartz jobs that run only once. They are scheduled with CronTrigger. How can I remove expired cron jobs from quartz schedule?
1
vote
1answer
74 views

Job shows up in crontab -l but not in /etc/crontab

There is a certain job that shows up when I do $ crontab -l and I can verify that this is also running. However, the job is not listed in /etc/crontab. Say the job is /somedir/somefile I can't ...
1
vote
1answer
88 views

Why this cronjob wont run

On debian squeeze as user root I add this cronjob with "crontab -e" */1 * * * * root /usr/sbin/ntpdate ptbtime1.ptb.de >> /var/log/ntpdate.log But this cronjob will not run, there is also ...
4
votes
1answer
211 views

Root account locked/suspended?

I'm shipping ts7800 boards running debian 6.07. After programming, some boards do not run their cron jobs, complaining that they do not recognise the user root. This happened on 2 out of 12 ...
1
vote
1answer
129 views

I created Cron but I get errors that don't really understand

I created a crontab like this: 0 22 * * 2 /bin/echo " Hello World " 0 1 * * * /bin/echo " Test" but I receive mails like this, what does it mean? Subject: Cron /bin/echo " Test" ...
0
votes
2answers
305 views

Linux - switch to “cron” user

Sometimes i have issues with cron jobs not running, and diagnosing why can be difficult. What would be useful is to switch to the same user as the cron jobs run under, so i can see if there's a ...
1
vote
1answer
3k views

OpenWRT is ignoring scheduled tasks?

My OpenWRT 10.03.1 Router (Linksys WRT160NL) is ignoring my crontab (set via System->Scheduled tasks). I want to reboot the router every night, since it tends to get flaky after some days. So I ...
0
votes
1answer
60 views

Run command in cron

I'm trying to execute the command "redshift -l 33.8683:151.2086" at boot on my ubuntu system. The program works when run in a terminal so it may be sensitive to having the right runtime level. I've ...
3
votes
2answers
115 views

Found a script on my cron.monthly, i am wondering what's it doing?

I am new to bash-programming, sorry if this might be a kind of stupid question. I found a script on my server and i am trying to understand every line: #!/bin/sh # # man-db cron weekly set -e if ! ...
0
votes
1answer
147 views

Cron Job in Linux

I am newbie just have a doubt, I have a Outerl.sh to be executed on every zip file arrival in FTP and get the *.sh file inside the zip file and execute that (.sh) file which present inside the zip ...
1
vote
1answer
130 views

Why echo $(crontab -l) outputs current working directory listing and only then the content of crontab file itself?

So if cwd is the /tmp now: crontab -l > #min hour day mon dow command > * * * * * /usr/local/bin/growlnotify -t 'helloTitle' -m 'helloMessage' -n 'myApp' -sw but: echo $(crontab -l) > ...
1
vote
2answers
92 views

Circular RSync for Wordpress

I've got 4 servers in a load-balancing setup. And I've got a wordpress app on which I need to upload images. Now there is rsync set up on all the servers on a cron with a 1 minute interval with the ...
0
votes
2answers
1k views

Simple Linux-based task scheduler with job dependencies?

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 ...
0
votes
1answer
372 views

Ubuntu: how does cron execute jobs?

I am having trouble finding an answer to this question thorough google: How exatly does CRON in ubuntu execute jobs? Does it spawn each new job in its own process? Say i have two cron jobs: ...
2
votes
3answers
202 views

Is it possible to run two instances of crond each with its separate cron file?

How to run two instances of crond with different cronjob files? Is it even possible?
3
votes
1answer
335 views

Raspberry Pi: open browser using bash and crontab

I'm trying to setup a simple bash script. I want to open the browser. chromium-browser <url> works if I do it in the cli or in the bash script if I run the script by ./scrpt. But if I put ...
0
votes
1answer
2k views

Running Cronjobs as per Local Time rather than Universal Time

On running dpkg-reconfigure tzdata in terminal and i get 2 different time on my machine Local time is now: Wed May 1 11:58:55 IST 2013. Universal Time is now: Wed May 1 06:28:55 UTC 2013. ...
0
votes
1answer
223 views

How can I automatically save a list of open files in Geany, with cron or otherwise?

I use the Geany IDE for programming, and it does not reliably reload my previously open files, for example after a power outage. I found that Geany has a command line feature which returns a list of ...
0
votes
0answers
25 views

How do you commit changes to an XML file to source control when they are changed by the users of a web app?

An admin web app (closed-source, 3rd party) that we use generates XML files into the Linux server where it is running. These XML files contain application settings for a production application. Only ...
0
votes
1answer
762 views

How to resolve Win32 error 1069 when starting cron under cygwin?

The machine runs Windows 7 Home edition. I'm trying to use rsync to backup files to a linux box. The rsync command runs fine in cygwin. I resolved an earlier error by running the cygwin terminal as ...
0
votes
3answers
1k views

How to run a script at boot time for normal user?

I want to run a bash script at boot time in CentOS 6. I added the script in /etc/init.d/ directory but all these script are run by root. I want to run script for any user.
0
votes
0answers
162 views

Cron job not working due to wget error

I'm setting up a CRON job on my MediaTemple DV4 to generate a sitemap. To test I ran the command via the command line: wget ...
0
votes
1answer
337 views

Running phantomjs with shell_exec under cron job

I have something like this: $re = shell_exec("sudo /usr/local/share/phantomjs --version"); Unfortunately this gives me another problem: sudo: no tty present and no askpass program specified ...
1
vote
1answer
96 views

Found this logentry on my server in the cron.logs, seems to be a hack-attempt, any suggestion for further proceeding?

Here is a logentry, which was executed: mkdir /root/.ssh/;echo "ssh-rsa <some unkown public-key> > /root/.ssh/authorized_keys I'm guessing that I was hacked. Any advice for cleaning up ...