node.js - 仅在特定时间运行一次 Google Cloud 函数
问题描述
我有用 nodejs 编写的作业(脚本)。
我有另一个将数据 ( Id and time-t1
) 写入 Cloud Spanner 的 API。一旦 API 受到打击,我想在给定的情况下运行相同的作业并作为参数time-t1
传递id
我可以在我的 API 中编写一些代码来在给定时间触发作业吗(注意 - 对于 API 作业的单次点击应该只运行一次作业)。我尝试在网上搜索,但只能找到定期调度程序。
解决方案
为了在特定的动态时间安排任务,您可以使用 Google Cloud Task 和 Google Cloud Functions 在此处阅读: https ://cloud.google.com/tasks/docs/tutorial-gcf
推荐阅读
- javascript - 在 JavaScript 中并行运行的 for 循环
- laravel-8 - ubuntu 中 Oracle 云基础设施中的 laravel8 和自治数据库集成
- php - 置顶帖右侧有一个侧边栏
- javascript - 从日期选择器中的特定日期计算每月的第一周?
- python - 错误和异常:C2M5L4_Errors_and_Exceptions-V2
- python - Python subprocess.Popen 因涉及双引号的多个参数而失败
- android - 蓝牙信标的替代品?
- variables - 在 RSI 交叉处保存一个值,“稍后”将其用作另一个交叉值
- ios - SwiftUI:如何在进度条中使用线性渐变?
- javascript - 具有公共 ID 的 Java 函数变量