From: Sthu Deus on
Good day.

Why is it so:

when a job is been run by cron then I get:

/etc/cron.weekly/ntping:
run-parts: failed to exec /etc/cron.weekly/ntping: Exec format error
run-parts: /etc/cron.weekly/ntping exited with return code 1

when I lunch at command prompt, then:

/etc/cron.weekly/ntping
12 Jul 13:20:10 ntpdate[10915]: step time server
aaa.bbb.ccc.ddd offset 2.974808 sec


?


Thank You for Your time.


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4c3ab532.5991d80a.292f.32ff(a)mx.google.com
From: Jordon Bedwell on
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 7/12/2010 1:24 AM, Sthu Deus wrote:
> Good day.
>
> Why is it so:
>
> when a job is been run by cron then I get:
>
> /etc/cron.weekly/ntping:
> run-parts: failed to exec /etc/cron.weekly/ntping: Exec format error
> run-parts: /etc/cron.weekly/ntping exited with return code 1
>
> when I lunch at command prompt, then:
>
> /etc/cron.weekly/ntping
> 12 Jul 13:20:10 ntpdate[10915]: step time server
> aaa.bbb.ccc.ddd offset 2.974808 sec
>
>
> ?
>
>
> Thank You for Your time.
>
>

Try adding a shebang to the top of your file:
#!/bin/sh

- --
Cheers,

Jordon Bedwell
http://envygeeks.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)

iQEcBAEBAgAGBQJMOrhwAAoJEDgik1XAY/+LBbYH/iWHHyc2wCtVE2ABNYsEFOTA
RyGymJNSnK5XdrWknEQ/+1S5OYX05JZWAEtz2gwJWv71tjTGRJpvf3UUNWdVS1wj
yi0irffjA1k5MNRUY3Wh6pBpC2ktUa7If8Fr7j70mGediuBy6wHK5tsRMaBbkJ8J
5evz6vYMG3yMXSN77WSnRd5Zzwk+WisFvGhNvGQzIJwZVkLibHZnRK56KDVf/9oT
KPhoMnj/J5YrjCOAWWy6preO1jXBVKOvTCfGuN+eZ3HbIg/IOupGjHKKk4qLnnio
OFthe6xIF4UT/E8Smm4+K2ccPzSvILuuR3BZrbrXgESW6GbCzwHOwK4UtEloJu8=
=itSE
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4C3AB870.9040002(a)envygeeks.com