Azure 管道 cron 触发器

时间:2021-06-24 07:35:11

标签: azure-devops azure-pipelines

我有一个 yaml 格式的天蓝色 DevOps 管道,我想每 3 小时运行一次。

我将 yaml 文件配置为具有 cron 触发器,如下所示:

schedules:
  - cron: '0 */1 * * *'
    displayName: Daily Trigger
    branches:
      include:
        - master
    always: true

variables:
  vmImageName: 'ubuntu-latest'

steps:
  - task: UsePythonVersion@0
    inputs:
      versionSpec: '3.x'
      addToPath: true
  - script: |
      python -m pip install --upgrade pip
      pip install selenium

  - task: Pythonscript@0
    inputs:
      scriptSource: 'filePath'
      scriptPath: './test.py'

但是管道根本没有触发。我错过了什么吗?

1 个答案:

答案 0 :(得分:1)

请在 cron 计划中检查您的分支名称。如果您有拼写错误,这可能是它不起作用的原因。

我用这个测试过:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ecomtrading.kitekoLite/com.ecomtrading.kitekoLite.activities.MainMenuActivity}: android.database.CursorWindowAllocationException: Could not allocate CursorWindow '/storage/emulated/0/KitekoLite/Dev/0271154324/.db/KitekoLite.db' of size 4194304 due to error -12.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3556)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3703)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2216)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7948)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
Caused by: android.database.CursorWindowAllocationException: Could not allocate CursorWindow '/storage/emulated/0/KitekoLite/Dev/0271154324/.db/KitekoLite.db' of size 4194304 due to error -12.
at android.database.CursorWindow.nativeCreate(Native Method)
at android.database.CursorWindow.<init>(CursorWindow.java:145)
at android.database.sqlite.SQLiteCursor.clearOrCreateWindow(SQLiteCursor.java:319)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:159)
at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:152)
at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:232)
at android.database.AbstractCursor.moveToFirst(AbstractCursor.java:271)
at com.orm.SugarRecord.runCustomQuery(SugarRecord.java:50)
at com.orm.SugarRecord.runCustomQuery(SugarRecord.java:42)
at com.example.core.utils.Utils.isScreenAvailable(Utils.java:571)
at com.ecomtrading.kitekoLite.common.ScreenHelper.hasScreenAccess(ScreenHelper.java:52)
at com.ecomtrading.kitekoLite.common.ScreenHelper.hasCustomerAccess(ScreenHelper.java:35)
at com.ecomtrading.kitekoLite.common.ScreenHelper.hasModuleAccess(ScreenHelper.java:15)
at com.ecomtrading.kitekoLite.activities.MainMenuActivity.loadScreens(MainMenuActivity.java:230)
at com.ecomtrading.kitekoLite.activities.MainMenuActivity.setUpNavigationView(MainMenuActivity.java:218)
at com.ecomtrading.kitekoLite.activities.MainMenuActivity.onCreate(MainMenuActivity.java:106)
at android.app.Activity.performCreate(Activity.java:7955)
at android.app.Activity.performCreate(Activity.java:7944)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3531)
... 11 more

它有效:

enter image description here

您可以尝试重新添加您的管道吗?