Can they be split into separate answers? –Eliah Kagan Nov 24 '11 at 23:07 4 Can you explain how 30 23 * * * translates to 11:15 PM? –JYelton Jan These fail under crontab, although some will work with input redirection. sudo /etc/init.d/cron start can be used to start cron. Your script should contain export DISPLAY=:0 somewhere. have a peek here
Using cron got the mail with the output of date command only. How do you put a reference next to image? asked 3 years ago viewed 20014 times active 3 months ago Upcoming Events 2016 Community Moderator Election ends in 8 days Linked 1 Debian bash script works fine from command line; If you set it up for a normal user, do you think that user has permission to source the root's profile? http://askubuntu.com/questions/23009/reasons-why-crontab-does-not-work
SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin share|improve this answer answered Jul 29 at 3:56 blokeish 1075 add a comment| up vote 0 down vote Just import your user profile in the beginning of the script. By reading the question, it seems like the error you are getting is arithmetic expression: expecting primary. How do I make an alien technology feel alien? These directories usually don't have the desired command.
share|improve this answer answered Jan 24 '11 at 10:02 community wiki Adam Matan 2 see geirha answer, you can (must) define cron's PATH –Capi Etheriel Jan 27 '11 at 3:22 Not sure if that's the problem? What is wrong with my side? Crontab Not Running Script The whole solution looks fragile.
You'd have to go through the whole script replacing /opt/someApp/bin with /opt/someAppv2.2/bin instead of just doing a small edit on the first line of the script. Bash Crontab Examples I don't want to do research (First year tenure-track faculty) Is it crazy to leave a tenured position for a non-tenured but tenure-tracked job? it doesn't –user3101956 Dec 14 '13 at 11:02 tail -f /var/log/syslog | grep CRON Dec 14 13:02:01 server3 CRON: (root) CMD (/bin/bash /var/scripts/vpn-check.sh) –user3101956 Dec 14 '13 at 11:02 browse this site Score a hand of Hearts GO OUT AND VOTE Is there a non-float alternative to pow()?
By setting permissions to --x------, I can make the script executable without them being able to read (and perhaps accidentally change) it. Cron Path any sane admin would ensure sane permissions/ownership on system files. –geirha Apr 10 '12 at 6:36 1 @pbr It seems we could go on forever, yes. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Isn't 5Ghz band affected with channel overlapping?
Doing so (at least in Ubuntu 10.10) breaks on both the inability to read the file as well as execute, plus the afore-mentioned issue with putting periods in /etc/crontab (which, funnily What does this symbol from inside the Kaaba mean? Crontab Not Working In Linux Of course you do! Cron No Mta Installed If the last entry in a crontab is missing the newline, cron will consider the crontab (at least partially) broken and refuse to install it." This behavior will be invoked when
Which java outputted the following results '/usr/bin/java' so it looks like I'm using the write java executable. http://itenlightenment.com/not-working/linux-usb-not-working.html This is not working correctly. The solution is to put everything on a single line. SDL web 8 Content Manager Explorer Interface shows zero publications Explicit formula of base change for GL(n) What is a Koffka Word™? (also: Connect the Clues!) Attack and Release times of Cron Command Not Found
Let's start with something really simple: * * * * * touch /tmp/testing.txt Okay, so that works Now let's try running a script that does the same * * * * What to do? Thanks! http://itenlightenment.com/not-working/mailx-not-working-cron.html It should be 600 and owner root:crontab.
Use: od -c * | grep \r share|improve this answer edited Sep 27 '12 at 7:53 community wiki 2 revsDoug That's a nasty one. –Adam Matan Sep 27 '12 Crontab Doesn't Run Script Not the answer you're looking for? Have you eaten enough?
Consider what happens if you want to run your script on a different system, and on that system, the command is in /opt/someAppv2.2/bin instead. So the job is running, it just never finds any files to delete. Do you want me? Crontab Permissions Yay! –Valien Oct 14 '13 at 14:27 1 See also How can I execute date inside of a cron tab job? –Jared Beck Apr 16 '15 at 20:49 add a
Suggestions to test or fix this for a failing command: Try running the command in sh to see if it works Wrap the command in a bash subshell to make sure Vi and vim use the character correctly, and cron was built before the new editors started their odd behavior... Would you like to answer one of these unanswered questions instead? http://itenlightenment.com/not-working/linux-not-working.html Your paths might be different.
linux debian shell-script cron share|improve this question edited Jul 25 '14 at 9:11 polym 4,59312149 asked Jul 25 '14 at 8:39 borsuk 813 marked as duplicate by cuonglm, jasonwryan, Anthon, Ramesh, asked 6 years ago viewed 41231 times active 3 years ago Upcoming Events 2016 Community Moderator Election ends in 8 days Linked 2 shell script fails when executed by cronjob, works Can spacecraft defend against antimatter weapons?