Is it possible to know in a mapreduce if it is run...
# ask-stanley-ai
r
Is it possible to know in a mapreduce if it is running because it was scheduled?
c
AI generated answer (using internal Slack threads):
Based on the conversations provided, it seems that there is no direct way to determine if a Map/Reduce script is running because it was scheduled within the script itself. However, you can check the status of a Map/Reduce script using the
N/task
API, specifically
task.MapReduceScriptTaskStatus
. This will provide information about the status of the script, but it does not specify whether the script was triggered manually or scheduled. Additionally, you can run saved searches on running Map Reduce instances using
search.Type.SCHEDULED_SCRIPT_INSTANCE
. This will give you a list of all running instances of your Map/Reduce script, but again, it does not specify whether the script was triggered manually or scheduled. In conclusion, while you can check the status and running instances of a Map/Reduce script, there is no direct way to determine within the script itself if it is running because it was scheduled. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84258157
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.835066915
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.835025072
Please provide your feedback on this answer.