我读过弹性魔豆周期性任务手动here, 看着这个代码在cron.yaml文件后: version: 1
cron:
- name: "backup-job" # required - unique across all entries in this file
url: "/backup" # required - does not need to be unique
如果用户或cronjob执行Linux shell脚本,是否可以识别? 如果是,我该如何识别/检查,如果shell脚本是由cronjob执行的? 我想在我的脚本中实现一个功能,它返回一些其他消息,就好像它是由用户执行的。像这样,例如: if [[ "$type" == "cron" ]]; then
echo "This was executed by a cronjob. It's