Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionJaskaran Singh Narula
2021-04-19 01:32:04 UTC
Description of problem:
When a complex cron is entered while creating any scheduled remote execution jobs it is unable to allow to create one.
- Not accepting Complex corn lines as --->>
[1] * * * * 7 [ $(date +\%d) -le 07 ] && /run/your/script
or
[2] * * * * 7 [ $(date +\%d) -le 07 ]
- But can only accept as ------>> * * * * 7
Version-Release number of selected component (if applicable):
Satellite 6.8.x
How reproducible:
100%
Steps to Reproduce:
1. On the satellite Web UI schedule a remote job and ad the corn line as mentioned above.
2. It will prompt the error and will not allow submitting the form.
Actual results:
While submitting the form to schedule a remote job below error can be seen.
Error:
----------
* * * * 7 [ $(date +\%d) -le 07 ] is not valid format of cron line
-----------
Expected results:
It should allow users to submit complex crons lines.
Additional info:
There is not such thing as a "complex cron line". A cron line is a set of 5 timing fields and anything that follows is a command.
In your example "* * * * 7 [ $(date +\%d) -le 07 ] && /run/your/script", the timing part is only "* * * * 7". The "[ $(date +\%d) -le 07 ] && /run/your/script" is a command. It fires every sunday and the as part of the thing being run it either exits early (if it is not the first week) or runs the script.
You can mimic the same behavior with remote execution as is, just note that the "exit early or continue" will be evaluated on each of the target hosts separately.
Hi!
I assume the restriction here is the use of cron for the scheduling. Would it make sense to create an RFE to improve this behavior at Satellite level so we can do the "first Monday of the month" or "third Sunday of the month" for monthly schedules?
The thing is, most likely these activities will happen outside of business hours, and this implies the ability to determine a cadence (monthly, or even yearly, or more complex by-monthy...) that can honor the day of the week.
Would it be possible? Can an RFE be opened for this purpose?
Thanks,
Imanol