The clue is in the error message: bin/sh: cannot create : nonexistent Notice that it says "sh". The Bourne shell doesn't support some features that are specific to Bash. If you're using Bash features, then you need to tell Bash to run the script Make the first line of your file:!
/bin/bash or in your crontab entry do this: bin/bash scriptname Without seeing your crontab entry and your script it's hard to be any more specific.
The clue is in the error message: /bin/sh: cannot create : nonexistent Notice that it says "sh". The Bourne shell doesn't support some features that are specific to Bash. If you're using Bash features, then you need to tell Bash to run the script.
Make the first line of your file: #! /bin/bash or in your crontab entry do this: * * * * * /bin/bash scriptname Without seeing your crontab entry and your script it's hard to be any more specific.
Already got both of those lines in! I'll update the original post – Comcar Feb 21 at 11:35 Ah wait a sec, I've written "bash" instead of "/bin/bash" in crontab, I'll update to the absolute path and see how that works... ok, that made no difference either – Comcar Feb 21 at 11:39 @Comcar: Ah, I now see where your problem is. There's no contents for $1 that you're sending your standard output to in the crontab entry.
You need to specify a filename. It makes no sense to use $1. It's meaningless in that context.
Also, in your edit, you have the shebang as "! /bin/bash". It needs to be #!
/bin/bash. – Dennis Williamson Feb 21 at 11:44 @Comcar: If you mean for stderr to go to the same place as stdout, then it needs to be 2>&1 instead of "2> $1". – Dennis Williamson Feb 21 at 11:46 Sorry yes I do have the #!
, just didn't copy the full line. And I can't believe it's just a typo after all that. The crontab wasn't running because of the $/& error.
What a fool I've been. Thanks Dennis! – Comcar Feb 21 at 11:56.
Perhaps the first thing you should do in your backups. Sh is insert a cd /home/user1. Crond may execute your script from a different directory than you think it does, and forcing it to use the same directory regardless of how it is executed could be a good first start.
Another potentially useful debugging step is to add id > /tmp/id. $$ or something like that, so you can see exactly which user account and groups are being used to run your script.
I've already got the cd in the top of the file, I added id >> this. Log to the script as the first line but it doesn't even get there far. Where you suggesting I add it to the crontab file?
– Comcar Feb 21 at 11:34.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.