Cron not running
Phil
phil_lor at bigpond.com
Tue Jul 30 07:26:43 UTC 2013
On 30/07/13 17:06, Nils Kassube wrote:
> Phil wrote:
>> On 30/07/13 16:04, Nils Kassube wrote:
>>
>> Thanks for replying Nils.
>>
>> This doesn't look correct:
>>
>> phil at Asus:~$ ps ax|grep -v grep|grep cron
>> 1099 ? Ss 0:00 cron
>
> I'm not sure, but I think that anacron isn't necessary to run jobs from
> your crontab. So that's probably OK.
>
>> And this is the cron job:
>>
>> phil at Asus:~$ crontab -l
>> #No comment
>> 20 16 * * * /home/phil/pretty.sh
>>
>> ./pretty.sh does run correctly.
>
> That means, with bash the script runs correctly. However cron doesn't
> use bash but sh instead (which is usually dash). And dash doesn't know
> the extensions of bash. Try the command
>
> sh ./pretty.sh
>
> to find out if cron should run it correctly. If you are using bash
> extensions, the first line of your script should be
>
> #!/bin/bash
>
> to explicitly run it with bash and not sh.
>
Thanks Nils, this is the script:
#!/bin/sh
echo "who's a pretty boy?"
I originally had #!/bin/bash but it didn't make any difference. The
script runs as both "sh ./pretty.sh" or just "./pretty.sh"
--
Regards,
Phil
More information about the kubuntu-users
mailing list