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

learn more… | top users | synonyms

1
vote
1answer
980 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
144 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
86 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
149 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
250 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
110 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
101 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
325 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
282 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
519 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 ...
2
votes
1answer
6k 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
73 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
191 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
276 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
2answers
305 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
115 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 ...
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 ...
0
votes
1answer
674 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
384 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
585 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 ...
2
votes
1answer
6k 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
445 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
31 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
1k 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 ...
1
vote
3answers
2k 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
269 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
526 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
103 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 ...
0
votes
1answer
217 views

Cron Job Command To Delete 0 Byte Files

I need to have a Cron Job, that when it runs automatically deletes all of the files inside of a folder that are exactly 0 bytes. The script I am using allows users to enter their username so it ...
0
votes
1answer
293 views

Crontab doesn't run my script Ubuntu

My script is located in /opt/restart-hlasic.sh restart-hlasic.sh contains: #!/bin/bash SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/ SERVER="XXX" ...
0
votes
2answers
65 views

Crontab - vim preferences

I use vim as my normal edito and so have my vimrc set up in a particular way. I quite often find myself editing crons with the command crontab -e When I do, I edit in vim, but without my normal ...
0
votes
1answer
60 views

Crontab comments on same line as job seem to cause issues

Can you put a comment on the same line as a cron job? Example: * 19 * * * lnxuser rm /home/lnxusr/edi/logs/mcfg204_`date -d -8days +\%Y\%m\%d`.log #THIS IS TO WIPE A 204 LOG THAT IS OLDER THAN A ...
1
vote
3answers
76 views

Prevent users from using the same cron schedule?

I've a lot of users in my server using exactly the same cron schedule and this is causing high server load. Can we prevent this? For example, if there's x numbers of users that use the following cron ...
1
vote
1answer
458 views

How to edit multiple cpanel user cron jobs at once?

I'm using cat /var/spool/cron/* to view all cron jobs created by all cpanel users. Is it possible to edit its output just like editing via nano and hit save?
1
vote
1answer
1k views

scheduling jobs on mac OSX 10.8.2

I am trying to schedule the execution of a .sh script on max OSX 10.8.2 I am using crontab and am getting an odd bug. If i am at the computer and set the task so that it executes in the next few ...
4
votes
1answer
904 views

git push to github via cron on mac

I'm trying to use git push in a bash script being run by crontab to push a commit to github. At the end of the script I'm doing this: # script processes some files, then: git add -A git commit -a -m ...
0
votes
1answer
245 views

How to execute a php file when a cron job is created

I want one of my PHP file to be executed when the cron job is executed. I want to do this for updating the database of every users. It is a Banking application project and I need to update every ...
0
votes
1answer
522 views

Schedule/cron MS Outlook to run rules

I have a ton of rules configured for my MS Outlook account. However, I'd like to create a "Cleanup Rule" that deletes messages in various folders. I'd like this rule to run every day at a certain ...
0
votes
1answer
763 views

What time does cron.monthly jobs run in SLES?

doc says cron.monthly will be scheduled according to the first run time and it compares /var/spool/cron/lastrun/cron.monthly with current time to run. Question is will it run according to the ...
1
vote
2answers
107 views

SSH: Dismiss read mail messages from Cron

Whenever I ssh to my server box, I get 'You have mail' along with banner message. Then I type mail, and go through msgs, by hitting enter, until At EOF shows up, and when I do quit or ctrl+d, and ...
3
votes
1answer
801 views

If I schedule a cron job to run at midnight, will it run at the start or end of the day?

If I schedule a cron job to run at midnight on a specific day, will the job run at the beginning of the day, or at the end of the day? For example: # Runs at midnight on 20th February: 0 0 20 2 *
0
votes
1answer
266 views

How do I run a shell script with export command in crontab?

I have a shell script that exports values of variables when executed. The same values will be used in another script. #!/bin/sh export I="10" echo $I I will be using root access for cron. I ...
0
votes
3answers
4k views

“/usr/bin/env bash” is not found when running from a cron script

I have this in my crontab: PATH=/usr/bin:/usr/local/bin:$PATH */1 * * * * /usr/bin/env bash > ~/cron.log 2>&1 The ouput in cron.log is the following: /usr/bin/env bash: No such file or ...
0
votes
2answers
282 views

crontab not working properly

When I run a script manually using root it is working fine. when I execute the same script inside cron it is not running. I checked the cron is actually calling the script but the script is not ...
0
votes
2answers
1k views

Execute a root command every 24 hours after startup

I want to execute a command as root on an Ubuntu 11.04 machine every 24 hours. This machine is not on all of the time, but when it is, it can be left on for days at a time. How should I correctly ...
0
votes
4answers
802 views

How to run the shell script periodically without using Crontab?

I do not have previlage to use crontab -e to run my script. Is there other way to periodically run my script? Basically I need to run it once a week.
2
votes
1answer
47 views

Crontab mis-entered time

I have a crontab that performs a massive operation that needs to run once every five hours #min hour mday month wday user command * */5 * * * ...
4
votes
1answer
764 views

system-wide crontab vs. user crontab to shutdown pc

I'm trying to shutdwon my pc at 2 am once a week. If I use the user crontab of root (sudo crontab -e) 30 2 * * 3 shutdown -h now the shutdown will not be performed. However, if I place the same ...
2
votes
5answers
2k views

rsync works fine until I put it in crontab (UPDATE: 'date' doesn't work in crontab)

I've got this rsync command that works just fine when I run it from the command line (Ubuntu Server 12.04.1 LTS). I'd like it to run every hour, on the hour, and output the results (along with errors) ...
2
votes
2answers
100 views

How to find rpm binary of a given process?

Here is the problem: I'm trying to find what cron software is running on my machine, however question applies to any generic process. One way to do it is: Find the process ps aux |grep cron Find ...