-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How could I realize aos [myProcess] --cron 5-minutes
in sub-process‘ lua code when using ao.spawn
#225
Comments
aos [myProcess] --cron 5-minutes
in process‘ lua codeaos [myProcess] --cron 5-minutes
in sub-process‘ lua code when using ao.spawn
Spawn(ao.env.Module.Id, {
Authority = ao.id,
["Cron-Tag-Action"] = "Cron",
["Cron-Interval"] = "5-minutes"
}) You will have to use the MU REST endpoint to engage monitoring...
|
When we define spawn, newprocess has not defined handler yet. Is cron already running? When we add handlers.add in the later part, it has business logic. Before that, is cron executing an empty loop? |
Yes cron calculates implicit messages based on interval, if you don't
handle them, they will go into your inbox
…On Tue, Sep 10, 2024 at 6:10 PM farmer ***@***.***> wrote:
When we define spawn, newprocess has not defined handler yet. Is cron
already running? When we add handlers.add in the later part, it has
business logic. Before that, is cron executing an empty loop?
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAFGLGN2CAQFYBNSKFWGF3ZV5U4RAVCNFSM6AAAAABN55L7QOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBSGEYTIMJUGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I just ran got |
I believe the newprocess is running,because I send a |
this is my code
I make test like:
but the cron part didn't work,so I make a futher test:
by far,I consider the handler's code is correct and the cron works too,but can't ao.send a Ping under Cron mode what could the problem be? |
who is the singer of a cron handler in sub-process,maybe no one? |
singer?
If you mean signer, cron messages are generated implicitly.
Thx
Tom
…On Wed, Sep 11, 2024 at 9:41 AM farmer ***@***.***> wrote:
who is the singer of a cron handler,maybe no one?
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAFGLCIJPJFO7EO66LSVKTZWBCBLAVCNFSM6AAAAABN55L7QOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBTG4YTAOBSGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
yes, signer,if cron messages are generated implicitly,the
the ao.send didn‘t work under implicit mode in my test, BUT works when called as a standard handler like |
do you have a test script you can share?
…On Wed, Sep 11, 2024 at 5:59 PM farmer ***@***.***> wrote:
yes, signer,if cron messages are generated implicitly,the
Handlers.add(
'CronTick',
Handlers.utils.hasMatchingTag('Action', 'Cron'),
function(msg)
**ao.send({Target ='l7ph6gka-mmrVE5P23lRa-1BWgQC8MXH8FcTbs6wk_U',Action = 'Ping'})**
msg.reply({ Data = "NPC has died." })
end
)
the ao.send didn‘t work in my test
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAFGLGYKAVF3BLJFDVUSM3ZWC4LPAVCNFSM6AAAAABN55L7QOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBUG43TMMRWGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
the |
And I‘m not the only one who met the problem |
Sorry, traveling, I will review your code as soon as possible.
Thanks
Tom
…On Thu, Sep 12, 2024 at 11:35 PM farmer ***@***.***> wrote:
And I‘m not the only one who met the problem
—
Reply to this email directly, view it on GitHub
<#225 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAFGLD23CLNDNA7GNZNHS3ZWJTQ7AVCNFSM6AAAAABN55L7QOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBYGAYTKMBWHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Have a good time! |
I had the same problem |
yes, bug exists when call ao.send in Cron of spawned sub-process |
To be continued here #228 |
How could I realize
aos [myProcess] --cron 5-minutes
in sub-process‘ lua code when using ao.spawnThe text was updated successfully, but these errors were encountered: