CGI自动化问题

发布于 2024-08-16 05:07:56 字数 293 浏览 1 评论 0原文

我是一名职业 .NET 开发人员,但最近一直在深入研究 LAMP 领域。

我有一个 Joomla/VirtueMart 电子商务网站即将推出。供应商的 xml 数据馈送必须经过转换才能导入到产品数据库中。

我编写了一个 .NET 控制台应用程序,可以轻松执行转换并上传到网站。我坚信有更好的方法。

所以我一直在研究cgi脚本。据我所知,执行 cgi 脚本的唯一方法似乎是通过 http 请求。有没有办法安排 cgi 脚本在特定时间运行?

另外,哪种语言最适合转换 xml? C、Perl 还是 Python?

I am a career .NET developer, but have recently been delving into the LAMP universe.

I have an Joomla/VirtueMart ecommerce site near ready to launch. The vendor's xml datafeed must undergo transformation before it can be imported into the products database.

I wrote a .NET console app that can easily perform the transform and upload to the site. I am convinced there is a better way.

So I have been looking at cgi scripts. Just from what I have read it seems the only way to execute a cgi script is through an http request. Is there a way to schedule a cgi-script to run at a specific time?

Also, which language works best for transforming xml? C, Perl, or Python?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

萌能量女王 2024-08-23 05:07:56

CGI 基本上只是一个定义为通过 HTTP 请求在服务器上执行任意程序的接口,仅此而已。

如何在特定时间在服务器上执行程序取决于服务器;基于 Windows 和 Linux 的系统通常都有调度程序服务。在 Linux 领域,它被称为 cron,计划的作业被称为 cronjob。如果托管您的应用程序的人没有提供其他机制,您可以使用服务器上的 crontab 实用程序定义作业(您需要 shell 访问权限);它的 文档 包含(有点难以访问,但你就知道了)关于 crontab 应该做什么的信息看起来像。网络上也有大量教程。

CGI is basically just an interface defined to execute arbitrary programs on a server by way of a HTTP request, nothing more and nothing less.

How you can execute a program on a server at a specific time depends on the server; both Windows and Linux-based systems usually have a scheduler service. In Linux land it's called cron, and a scheduled job is called a cronjob. If there is no other mechanism provided by whoever hosts your application, you can define jobs using the crontab utility on the server (you'll need shell access for that); its documentation includes (somewhat inaccessible, but there you go) information about what a crontab should look like. There are tons of tutorials on the web, too.

苍暮颜 2024-08-23 05:07:56

XSLT 转换可能是将 XML 文件转换为可以轻松导入的内容的最佳选择。 XSLT 转换可以用您选择的任何语言进行处理。

an XSLT transformation is probably your best bet for turning XML files into things you can easily import. An XSLT transform can be processed in any language of your choice.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文