Gossamer Forum
Home : General : Internet Technologies :

crontab 256 error....

Quote Reply
crontab 256 error....
Does anyone know where I can find a list of error codes for crontab? I'm getting a 256 error returned, but I'm not quite sure what it actually means Frown I've had a look at it on google, but all my search terms just bring up stuff about 'crontab' with 256mb of memory in the machine, and error pages (basically garbage)...I've looked through some of the pages, and they are just mainly FAQ pages, which happen to have the keywords on :(

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] crontab 256 error.... In reply to
What is the exact error code?

- wil
Quote Reply
Re: [Wil] crontab 256 error.... In reply to
It doesn't give a special error. The '256' part is returned by $? (or $!)...this is in my cron script. I'm just trying to work out what the problem could be.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] crontab 256 error.... In reply to
Well what is the code that produces that error? It could be the program that's returning that error, and not crontab.

- wil
Quote Reply
Re: [Wil] crontab 256 error.... In reply to
Nah, its definatly a crontab error. I had it a while back when developing the script.... I just can't find out where I got the error message to go with the error code Frown

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] crontab 256 error.... In reply to
I don't understand at which point you are using $?

We need to see the code.
Quote Reply
Re: [Paul] crontab 256 error.... In reply to
Here is the code thats in question;

Code:
# now we can add it...
$location = $current_dir . "cron.txt";
if ($debug) { &debug("Running: crontab $location"); }
open PIPE, "crontab $location |";
@res = <PIPE>;
close PIPE or $bad = "$?,$!";

# catch the error if we have one :D
if ($bad) { $report = "ERROR: Could not update crontab. Reason: $bad"; } else
{ $report = "Updated cron Cron has been updated successfully..."; }

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] crontab 256 error.... In reply to
Well for starters you aren't error checking open() so for all you know that might be failing which is causing the close() to fail.
Quote Reply
Re: [Paul] crontab 256 error.... In reply to
Thats a very good point. I'll check into that, and see how it goes. I think I was getting too excited about the advanced code, and forgot about basic checking Crazy

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] crontab 256 error.... In reply to
Which bit is advanced?..I must have missed it Cool
Quote Reply
Re: [Paul] crontab 256 error.... In reply to
Oi, watch it Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!