我正在尝试了解 iMacros 的 cron,但我不知道该去哪里找。Google 没有帮助。
基本上我有我编写的脚本,一系列命令,如下所示:
Line 1
Line 2
Line 3
ETC。
我想要做的是每 5-10 分钟运行 10 行(随机决定 5 到 10 分钟内的时间),并且每行之间有一个时间间隔,比如说,2 到 5 秒(随机决定 2 到 5 秒内的时间)。
我是 iMacros 的新手,不知道从哪里开始学习他们的脚本语言。不过,我能够编写一些非常好的脚本,它们运行良好,但我不知道如何为它编写 cron。
简而言之,它看起来应该是这样的(我用我想要的 cron 的描述替换了代码;“第 1 行”只是我想要运行 cron 的代码的填充):
Line 1 [run cron, between 2 and 5 seconds before executing next line]
Line 2 [run cron, between 2 and 5 seconds before executing next line]
Line 3 [run cron, between 2 and 5 seconds before executing next line]
Line 4 [run cron, between 2 and 5 seconds before executing next line]
Line 5 [run cron, between 2 and 5 seconds before executing next line]
Line 6 [run cron, between 2 and 5 seconds before executing next line]
Line 7 [run cron, between 2 and 5 seconds before executing next line]
Line 8 [run cron, between 2 and 5 seconds before executing next line]
Line 9 [run cron, between 2 and 5 seconds before executing next line]
Line 10 [run cron, between 2 and 5 seconds before executing next line]
[run cron, between 5 and 10 minutes before executing next line]
Line 11 [run cron, between 2 and 5 seconds before executing next line]
Line 12 [run cron, between 2 and 5 seconds before executing next line]
Line 13 [run cron, between 2 and 5 seconds before executing next line]
Line 14 [run cron, between 2 and 5 seconds before executing next line]
Line 15 [run cron, between 2 and 5 seconds before executing next line]
Line 16 [run cron, between 2 and 5 seconds before executing next line]
Line 17 [run cron, between 2 and 5 seconds before executing next line]
Line 18 [run cron, between 2 and 5 seconds before executing next line]
Line 19 [run cron, between 2 and 5 seconds before executing next line]
Line 20 [run cron, between 2 and 5 seconds before executing next line]
[run cron, between 5 and 10 minutes before executing next line]
Line 21 [run cron, between 2 and 5 seconds before executing next line]
Line 22 [run cron, between 2 and 5 seconds before executing next line]
Line 23 [run cron, between 2 and 5 seconds before executing next line]
Line 24 [run cron, between 2 and 5 seconds before executing next line]
Line 25 [run cron, between 2 and 5 seconds before executing next line]
Line 26 [run cron, between 2 and 5 seconds before executing next line]
Line 27 [run cron, between 2 and 5 seconds before executing next line]
Line 28 [run cron, between 2 and 5 seconds before executing next line]
Line 29 [run cron, between 2 and 5 seconds before executing next line]
Line 30 [run cron, between 2 and 5 seconds before executing next line]
[run cron, between 5 and 10 minutes before executing next line]
Line 31 [run cron, between 2 and 5 seconds before executing next line]
ETC。
如果我能有一个类似下面的脚本就更好了,但我不知道从哪里开始:
[run sets of 10 lines, consecutively increasing number x, "Line x" x+1, waiting between 2 and 5 seconds before executing each line; then after each set of 10, pause for randomly generated interval of between 5 and 10 minutes before executing next set; repeat]
答案1
iMacros 本身无法运行如此复杂的程序。但是,你可以将它与 Java 或任何 Web 编程语言结合使用,从而实现这一目标。
以下是iMacros 教程还有一点Web 脚本功能概述。