question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Q] How can I check scheduled task by if operator?

See original GitHub issue

Scheduled task allows in production only. In development environment, run tests by manual.

How can I check scheduled task by if operator?

timezone: Asia/Tokyo

schedule:
  daily>: 04:00:00

+set_environment_to_local:
  py>: python.SetEnvironment.run

+check_env:
  if>: ${APP_ENV != 'production'}
  _do:
    fail>: allows scheduled task in production only.

+do_tasks:
  ...

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hiroyuki-satocommented, Aug 11, 2017

I can’t understand the following part. Could you tell me more details about this?

Scheduled task allows in production only. In development environment, run tests by manual.

How about check next_session_time? http://docs.digdag.io/workflow_definition.html#using-variables

timezone: UTC
# if this part remove, you will see "It's not scheduled" message
schedule:
  minutes_interval>: 1

+setup:
  sh>: echo start ${session_time}

+check_scheduled:
  if>: ${typeof(next_session_time) == 'undefined'}
  _do:
    echo>: It's not scheduled
0reactions
yoyamacommented, Mar 5, 2019

I would like to close this issue because of no updated information. If there is anything update, please re-open or create new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use PowerShell to Show Results of Scheduled Tasks
Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to see the results of scheduled tasks.
Read more >
How to detect if a specific scheduled task is running?
Using plain MSDOS, you can do: schtasks /query /TN my-task-name /FO LIST. And extract the output. As an example I do:
Read more >
Scheduled Task If Statement - Spiceworks Community
I need help creating an IF statement for scheduled task. If the task already exists it continues with the script. If it doesn't...
Read more >
Testing to see if a scheduled task exist in powershell
If I echo $task.name from the shell without going through the script, it properly displays the name. powershell · foreach · scheduled-tasks ·...
Read more >
Schedules — Django Q 1.3.6 documentation
'H' the scheduled task will run every hour after its first run. DAILY ¶. 'D' the scheduled task will run every day at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found