cdt123
Posts: 2
Joined: Fri Mar 28, 2014 1:37 pm

Wolfram as a cron task

Wed Apr 02, 2014 10:58 pm

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.

dennisw
Posts: 18
Joined: Fri Nov 22, 2013 7:06 am

Re: Wolfram as a cron task

Thu Apr 03, 2014 1:14 am

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).
raspberrypi.stackexchange.com --- mathematica.stackexchange.com

cdt123
Posts: 2
Joined: Fri Mar 28, 2014 1:37 pm

Re: Wolfram as a cron task

Thu Apr 03, 2014 11:19 pm

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.

Return to “Wolfram Language”