Is there a way for a user or a task to send something to the scheduler log? cylc message appears to be tied to jobs, but I was thinking about just wanting to log something in the scheduler log for tracking purposes, not for Cylc itself to make use of.
The cylc message command is the way to do this, however, it is tied to jobs as you say.
You can still use it outside of jobs, and it will appear in the scheduler log, but as an “undeliverable task messages received and ignored” warning.
What type of event are you attempting to feed into the log?
Yes, that is what I’ve noticed and thought may work. It seems a bit sub-optimal as I think it doesn’t show until it times out or fails - it wasn’t immediate.
In this specific case, I was wanting a CI pipeline to send a message to the scheduler when it does an action. For example, CI launches a workflow, it would message the scheduler log so the log shows pipeline URLs, etc.
It should be immediate, there’s no timeout involved unless the cylc message command can’t connect to the scheduler for some reason.
I can do this, to send a message to a scheduler from a fake task job:
$ cylc message test 1/fake-task/01 "the quick brown fox"
2025-06-30T02:05:41Z INFO - the quick brown fox
FileNotFoundError: [Errno 2] No such file or directory: '/home/oliverh/cylc-run/test/run67/log/job/1/fake-task/01/job.status'
The command reports an error: the fake job does not exist, so it has no status file to update.
But the scheduler immediately reports the message::
WARNING - Undeliverable task messages received and ignored:
1/fake-task/01: INFO - "the quick brown fox"
The wording could be clearer (although it’s not a warning we see much). “Undeliverable message” just means there’s no active task matching the Cylc ID from the message.
It’s not clear to me that the Cylc workflow event log should be expected to record messages from external systems, even ones that launch workflows. Wouldn’t it make more sense for your CI system log to, say, record that it launched the workflow, and link to the workflow log?
The workflow log is relatively transient, so the pipeline log link would be invalidated quite quickly. Whereas the pipeline link is more permanent, so reveiwing a workflow log from an archive would allow you to navigate to the correct link still, but not vice-versa.
Ok, maybe I am mis-remembering as it was a week ago I looked.
Yes, that is completely fair and valid. It was one example I had in my head. Looking at the contents of the scheduler log at the moment, all information is in some way linked to a task (except stall warnings, etc). I was thinking things like wanting to put a note in there to back-reference about a change to configuration was made on a specific date - but that can easily be argued to be managed elsewhere.