Re: Problem cron job not converting excel files



the file with the .sh extension is the output file that ssconvert creates.

the .sh is to execute a long list of etl jobs to import time-series xls files into a mysql database. this is then executed by cron on a monthly basis.

because the parameters for the etl job varies between years and months, i created a spreadsheet file to calculate these parameters, then early of the month, ssconvert will convert it into an executable .sh file. another cron job will then execute the .sh file for the etl jobs.

i am using gnumeric spreadsheet 1.10.1 on ubuntu 10.04 ( i have also been testing it out on ubuntu server 10.04 with gnumeric 1.10.1)

here is another file that you can test:
http://www.bnm.gov.my/files/publication/msb/2010/10/xls/2.3.xls

download the file, then open it using openoffice / gnumeric then save it as openoffice spreadsheet .ods

make a directory /opt/eids_etl and copy the file 2.3.xls and 2.3.ods to the folder /opt/eids_etl/

copy the following cron job script (which will execute ssconvert at 00 min 5.00pm 11th of month / 05 min 5.00pm 11th of month respectivley):
00 17 11 * * ssconvert --import-type=Gnumeric_Excel:excel --export-type=Gnumeric_stf:stf_assistant -O 'sheet="2.3" separator=, format=raw quote=""' /opt/eids_etl/2.3.xls /opt/eids_etl/2_3.csv
05 17 11 * * ssconvert --import-type=Gnumeric_OpenCalc:openoffice --export-type=Gnumeric_stf:stf_assistant -O 'sheet="2.3" separator=, format=raw quote=""' /opt/eids_etl/2.3.ods /opt/eids_etl/2_3_ods.csv

now go to a terminal and logon as root (in ubuntu it is sudo -i)

edit your cron jobs (in ubuntu it is crontab -e), if you selected to edit using vi then press the [i] key to insert mode

paste the copied cron script (right-click on the mouse then select paste)

if needed, edit the minutes / hour / day

save your cron job and exit (if you are using vi, then type :wq then press the [Enter] key)

check your cron job (if you are using ubuntu it is crontab -l)





On Sat, Dec 11, 2010 at 1:38 PM, Andreas Guelzow <aguelzow pyrshep ca> wrote:
Looking at the CMD, everything between (), what is the last argument supposed to achieve, ie the file with extension .sh?

Andreas

A J Guelzow


On 2010-12-10, at 19:40, Raja Iskandar Shah <rajaiskandars gmail com> wrote:

this is all that i have under /var/log/syslog (log for cron under ubuntu)

Dec 10 19:00:24 iskandar-thinkpadx100e kernel: [36179.653096] rtl8192_SetWirelessMode(), wireless_mode:4, bEnableHT = 0
Dec 10 19:02:24 iskandar-thinkpadx100e kernel: [36299.649520] rtl8192_SetWirelessMode(), wireless_mode:4, bEnableHT = 0
Dec 10 19:04:01 iskandar-thinkpadx100e CRON[5001]: (root) CMD (ssconvert --recalc --import-type=Gnumeric_OpenCalc:openoffice --export-type=Gnumeric_stf:stf_assistant -O 'sheet="etlclient_eids" format=raw quote=""' /opt/eids_etl/MOF-EIDS2-ETL-Configuration.ods /opt/eids_etl/etlclient_eids_1.sh)
Dec 10 19:04:24 iskandar-thinkpadx100e kernel: [36419.651040] rtl8192_SetWirelessMode(), wireless_mode:4, bEnableHT = 0
Dec 10 19:06:24 iskandar-thinkpadx100e kernel: [36539.650656] rtl8192_SetWirelessMode(), wireless_mode:4, bEnableHT = 0
Dec 10 19:08:24 iskandar-thinkpadx100e kernel: [36659.650970] rtl8192_SetWirelessMode(), wireless_mode:4, bEnableHT = 0
Dec 10 19:10:24 iskandar-thinkpadx100e kernel: [36779.650938] rtl8192_SetWirelessMode(), wireless_mode:4, bEnableHT = 0
Dec 10 19:12:24 iskandar-thinkpadx100e kernel: [36899.650066] rtl8192_SetWirelessMode(), wireless_mode:4, bEnableHT = 0
Dec 10 19:14:01 iskandar-thinkpadx100e CRON[5044]: (root) CMD (ssconvert --recalc --import-type=Gnumeric_Excel:excel --export-type=Gnumeric_stf:stf_assistant -O 'sheet="etlclient_eids" format=raw quote=""' /opt/eids_etl/MOF-EIDS2-ETL-Configuration.xls /opt/eids_etl/etlclient_eids_2.sh)
Dec 10 19:14:24 iskandar-thinkpadx100e kernel: [37019.654852] rtl8192_SetWirelessMode(), wireless_mode:4, bEnableHT = 0
Dec 10 19:16:24 iskandar-thinkpadx100e kernel: [37139.652925] rtl8192_SetWirelessMode(), wireless_mode:4, bEnableHT = 0
Dec 10 19:17:01 iskandar-thinkpadx100e CRON[5071]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)

i am having the same problem also with converting to .csv with separator=,


On Fri, Dec 10, 2010 at 10:12 PM, Morten Welinder <mortenw gnome org> wrote:
You need to give us some solid information to work with.
Error messages from /var/log/messages or email or wherever
your cron puts them would be a good start.

M.

_______________________________________________
gnumeric-list mailing list
gnumeric-list gnome org
http://mail.gnome.org/mailman/listinfo/gnumeric-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]