ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Running pychartdir fail in crontab
Posted by Roble on Sep-11-2012 08:15
When I mannual run the python script on Linux, it working well. But when I add it into crontab, it doesn't work any more.

I using crontab -e and running script with same linux account. Python version = 2.5.4
================================================================

from pychartdir import *
path = '/home/roble/stat/pie.png'
datas = [144, 224, 1038, 267, 63, 20, 3]   #changed by input
labels = ['t1', 't2', 't3', 't4', 't5', 't6', 't7']
tll = "Server Performance(4H)"
c = PieChart(440, 250, 0xffffff, -1, 1)
c.addTitle(tll, "arialbd.ttf", 11)
c.setPieSize(220,110,90)
c.set3D(20)
c.setLabelLayout(SideLayout)
t = c.setLabelStyle()
t.setBackground(SameAsMainColor, Transparent, glassEffect())
t.setRoundedCorners(15)
c.setLineColor(SameAsMainColor, 0x000000)
c.setStartAngle(135)
c.setData(datas,labels)
c.makeChart(path)

  Re: Running pychartdir fail in crontab
Posted by Roble on Sep-11-2012 08:19
there is no fail message, check crontab log, the item was surly be called

  Re: Running pychartdir fail in crontab
Posted by Roble on Sep-11-2012 09:32
I found root cause here, the problem due to python version. I installed chartdirector with 2.5, but running crontab will call 2.6, that's why chartsdirector not work.

add python path can fix.

0, * * * * /usr/local/bin/python2.5 /**/pie.py