Home > Ubuntu 12 04 > Ubuntu 12.04 Cron Not Working

Ubuntu 12.04 Cron Not Working

I did something like this instead:- import os import sys import time, datetime CLASS_PATH = '/srv/www/live/mainapp/classes' SETTINGS_PATH = '/srv/www/live/foodtrade' sys.path.insert(0, CLASS_PATH) sys.path.insert(1,SETTINGS_PATH) import other_py_files Never supress the crontab code instead use For example: some-command > /dev/null This will redirect only standard output, and not error output (which is usually what you want, since you want to be informed of errors). Perms are set to 755 for all scripts so they are executable. Browse other questions tagged linux cron crontab or ask your own question. http://techese.net/ubuntu-12-04/ubuntu-12-04-ntp-not-working.html

The sane way to handle that is to install it as a different command. It is located in /etc/cron.d/publish.cron: ----------------------- * * * * * jpablo /srv/django-apps/smcommand/scripts/publish.sh ----------------------- It is correct, I want it to execute every minute. Using the file provides a backup of what the crontab should be, and allows temporary edits (the only time I use crontab -e) to be backed out automatically. Thanks cron share|improve this question asked Aug 28 '13 at 17:48 gabe 1471112 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote accepted You should escape

The Art of Word Shaping Lab colleague uses cracked software. Then, after it was run (according to your syslog), check your /tmp/test.log if it was a) created and b) has the words in. –Izzy Jul 5 '12 at 16:29 share|improve this answer answered Oct 24 '12 at 7:22 community wiki JohnGH add a comment| up vote 3 down vote I was writing an install shell script that creates another script

a rake task on a Rails application may need to be in the application root for Rake to find the correct task, not to mention the appropriate database configuration, etc. I kept doing ps -ef | grep foo –ripper234 Mar 17 '11 at 17:01 3 You could also use pidof cron which will omit results for other applications that also Higher up doesn't carry around their security badge and asks others to let them in. So I added the output log command to the end of one of the jobs ( suggested by mlsrar ) and then got distracted (dang customers!) and the issue fell on

Why would a Teen TV show needed a FBI warning inside Young Justice universe? So your commands won't run, and your log files won't be written... Koch Mar 30 '14 at 11:44 3 Bear in mind that cron jobs do not run with all the environment that an interactive command would - for instance, when you http://askubuntu.com/questions/23009/reasons-why-crontab-does-not-work Locking plane for a long period Squeaky belt issues on '95 Chevy S10 Are there eighteen or twenty bars in my castle?

To see the difference, add a dummy job like this: * * * * * env > /tmp/env.output Wait for /tmp/env.output to be created, then remove the job again. My two gotchas: mycronjob file had to be owned by root to run I had to set permissions of the file to 644 - 664 would not run. I'll lick you, I'm neat Utensil that forms meat into cylinders Word to describe object that can be passed through Taxing GoFundMe Donations How can I find the perimeter of a The best choice is to ensure that your crontab has a blank line at the end. 4th Berkeley Distribution 29 December 1993 CRONTAB(1) share|improve this answer edited Feb 2 '11 at

In opensuse whenever I modify the file there's a confirmation message in /var/log/messages: /usr/sbin/cron[2529]: (*system*) RELOAD (/etc/cron.d/publish.cron) But on ubuntu there isn't such message. http://unix.stackexchange.com/questions/47189/why-isnt-cron-running-automatically DistroUbuntu 10.04 Lucid Lynx Re: cron jobs not running That was easy - glad its fixed! How can I find the perimeter of a concave pentagon? "Mobile homes" in American and British English Was Adi Shankaracharya’s Parakaya Pravesha to learn Kamashastra Dharmic? Changed your mind?

angle grinder versus sawzall Word to describe object that can be passed through more hot questions question feed about us tour help blog chat data legal privacy policy work here advertising check over here ubuntu cron share|improve this question edited Sep 5 '12 at 8:25 warl0ck 21.6k26108232 asked Sep 5 '12 at 3:12 Jingqiang Zhang 10813 What do you call “the cron file”? To get around that, just set your own PATH variable at the top of the script. The log file is created (and empty).

Why do Internet forums tend to prohibit responding to inactive threads? This site is not affiliated with Linus Torvalds or The Open Group in any way. Write each reason in a separate answer. his comment is here Thereafter you can find the output of the applications ran by CRON using tail -f /var/mail/ Of course you can also write the logging output to a dedicated log file or

Still thanks a lot! This script plans to use account cyg_server. Yes, I'm sure.

If not, try redirecting the stderr and stdout of your program to a file.

The cron service was removed. Can leaked nude pictures damage one's academic career? The contents of the dump.sh code is: cd cd Desktop/bala/personal mkdir $(date +%Y%m%d) cd $(date +%Y%m%d) mysqldump -u root -p*** --all-databases |gzip -9 >database-$(date +%Y%m%d).sql.gz ubuntu cron share|improve this question edited If the directory is network shared, then I often use crontab.$(hostname) as the name of the file.

The problem was that the cron filename had a dot in it, and cron doesn't like that, so it was ignoring the file. INFO: User is a valid privileged account. Verified new passwd file shows /bin/bash like in the scripts that are being run. weblink This also affects scripts using non standard commands.