This article is also available in our new Knowledge Base: Monthly Job Scheduling Form Doesn't Have the Day 31
Applies to:
Zend Server 8.5.X
GNU / Linux
Microsoft Windows
OS X
Issue:
The day 31 is not listed when scheduling a monthly recurring Job from Zend Server UI | Job Queue | Recurring Jobs.
Solution 1:
To fix the issue, you need to do a small change in the file /usr/local/zend/gui/module/JobQueue/views/job-queue/recurring-jobs/form.phtml for GNU / Linux and OS X or in C:\Program Files (x86)\Zend\ZendServer\gui\module\JobQueue\views\job-queue\recurring-jobs\form.phtml for Microsoft Windows to add the day 31.
For GNU / Linux:
Execute the following commands as root:
For Microsoft Windows:
1. Create a backup copy of form.phtml
2. Open form.phtml in a text editor
3. Locate the following line (should be line 422):
4. Replace it with:
5. Save the file.
For OS X:
Finally refresh the Zend Server UI page and go to the recurring Job rule's page to see whether the day 31 appears in the drop down list while adding a Monthly Job rule.
Solution 2:
The Zend Server UI has some limitations in scheduling the recurring jobs - it is in fact impractical to implement the full UI to cron. Therefore, if you need to implement some advanced scheduling options, consider doing this through Zend Server's Job Queue API - by means of a simple PHP script. For example, if you want to run a job at the last day of each month, you can do it like this:
These jobs will run at 1:00AM on the last day of each month.
Note:
This issue is already resolved in the next Zend Server release 9.0.
Comments