SID-00537: EXCEL2TOPICS in a CRON job
| Status: |
Answered |
TWiki version: |
4.2.1 |
Perl version: |
5.2.8 |
| Category: |
ExcelImportExportPlugin |
Server OS: |
Linux Kernel version: 2.6.18-128.1.6.el5 |
Last update: |
16 years ago |
How would one run - excel2topics - in a CRON job? My objective is to have an Excel spreadsheet update a set of topics on a nightly basis.
I have the appropriate topic set up called
AutoLoad. It works perfectly when the link
http://myurl.com/bin/excel2topics/Main/AutoLoad is clicked from the topic itself.
The XLS file gets uploaded to the proper place (../pub/Main/==AutoLoad==) automatically, and the loading can be run manually.
I just cannot figure out how to execute - excel2topics - in a CRON job.
- excel2topics
- Web: Main
- Topic:
AutoLoad
Thanks.
Bob Mellinger
--
BobMellinger - 2009-09-21
Discussion and Answer
Assuming no authentication is required do this:
/usr/bin/wget --output-document=/tmp/excel2topics-output.txt http://myurl.com/bin/excel2topics/Main/AutoLoad
There are options to authenticate,
http://www.gnu.org/software/wget/manual/wget.html
--
PeterThoeny - 2009-09-21
- You might be able run the Perl file with the command
perl /.../twiki/lib/TWiki/Plugins/ExcelImportExportPlugin/Import.pm, but I couldn't see how to pass the web and topic names as command line arguments. You could always hard-code them :-).
- You could call the URL with the Unix command
wget
--
SeanCMorgan - 2009-09-21
That worked perfectly. Thanks very much.
--
BobMellinger - 2009-09-22
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.