是否可以自动化 Google 电子表格脚本(例如,没有触发它们的事件)? [英] Is it possible to automate Google Spreadsheets Scripts (e.g. without an event to trigger them)?
问题描述
有谁知道是否可以使用 Google Apps Scripts 在不需要手动事件的情况下运行?含义 - 我想设置一个电子表格,以便每天在指定时间发送一个表单.我已经找到了如何通过执行脚本来手动发送表单,但 Google 是否实现了设置脚本以在将来(并且在重复的基础上)运行的能力?
Does anyone know if it's possible to use Google Apps Scripts to run without needed a manual event? Meaning - I would like to set up a spreadsheet to send a form every day at a specified time. I have figured out how to manually send the form by executing a script, but has Google implemented to ability to set a script to run in the future (and on a recurring basis)?
我已经搜索了答案,但没有找到.
I have searched for an answer but can't find one.
谢谢...
推荐答案
现在可以添加基于时间的事件.
Now it is possible to add time based events.
来自:http://code.google.com/googleapps/appsscript/guide_events.html
- 编辑 -> 当前项目的触发器.您会看到一个带有消息未设置触发器的面板.单击此处立即添加一个.
- 点击链接.
- 在运行下,选择您要按计划执行的功能.
- 在事件下,选择时间驱动.
- 在出现的第一个下拉列表中,选择周定时器、日定时器、小时定时器或分钟定时器.根据您的选择,您会看到一个或两个附加列表.要测试触发器和您的函数,您可能需要选择一个较短的持续时间,以便无需等待数小时或数天即可看到执行情况.
- 如果您选择了周定时器,请选择一周中的某一天和一天中的时间.
- 如果您选择了日间计时器,请选择一个小时.
- 如果您选择了小时计时器,请选择小时间隔.
- 如果您选择了分钟计时器,请选择分钟间隔.
- 点击保存.
- 要确保脚本在特定时区的正确时间运行,请单击文件 > 属性,选择一个时区,然后单击保存.
这篇关于是否可以自动化 Google 电子表格脚本(例如,没有触发它们的事件)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!