Page 1 of 1

Wolfram as a cron task

Posted: Wed Apr 02, 2014 10:58 pm
by cdt123
Hello all,

Has anyone tried to have a wolfram script run as a cron task? My script runs fine at the command prompt but does not work when setup as a cron task, either as user pi or when using sudo to run crontab.

This line of code:
datTicker = Quiet[FinancialData[inTicker, strStartDate, "Value"]]

gives this error:
TextForm[ColonForm[MessageName[Get, noopen], StringForm[Cannot open `1`., Short[HoldForm[13-48.w], 3]]]]

(13-48.w is the name of my script file.)

Any help would be appreciated.

Re: Wolfram as a cron task

Posted: Thu Apr 03, 2014 1:14 am
by dennisw
cdt123 wrote:Hello all,

Has anyone tried to have a wolfram script run as a cron task? My script runs fine at the command prompt but does not work when setup as a cron task, either as user pi or when using sudo to run crontab.

This line of code:
datTicker = Quiet[FinancialData[inTicker, strStartDate, "Value"]]

gives this error:
TextForm[ColonForm[MessageName[Get, noopen], StringForm[Cannot open `1`., Short[HoldForm[13-48.w], 3]]]]

(13-48.w is the name of my script file.)

Any help would be appreciated.
Please show the line from your crontab and the full contents of your script (or at least the very first line).

Re: Wolfram as a cron task

Posted: Thu Apr 03, 2014 11:19 pm
by cdt123
I am using a Python script to call a Wolfram script. In the call to the Wolfram script I had a relative path that should have been a full path. Putting a full path into the script fixed my problem; not a problem with cron after all.

Thanks for taking the time to answer.