You are here
Tony Upson - Sat, 2015/10/10 - 05:22
Question: When I navigate to WebAdmn --> Scheduled Cron Jobs...
I see a list of jobs pre-created that have 'test' at the beginning. Are these cronjobs live or in some sort of test mode?
Reason I ask is because my OTRS is notifying me of a job (that is listed in the scheduled cronjobs) is not running:
Forum:
Tags:
i am going to say that was a
i am going to say that was a SPAM reply as it had nothing to do with my post. At anyrate, I assume the 'Test -x' before all the jobs are putting it in test mode? Do I need to remove them to enforce their actual use?
- Tony
Network Engineer
Federal Gov't
deleted spam
Anyway, the "test -x" just means that it's testing if the scripts are executable before it tries to execute them.
I'd be looking in the logs (in /var/logs should hopefully be a otrs directory of file)
What does this command
What does this command execute?
test -d /run/otrs || mkdir -p /run/otrs && chown otrs:www-data /run/otrs && chmod 770 /run/otrs
- Tony
Network Engineer
Federal Gov't
I'll write it in English
"||" is the 'OR' logic operator; code after that only executes if the command before it fails (non-zero exit code)
"mkdir" makes a directory
"&&" is the logic 'AND' operator; code after that only executes if the command before it succeeds (exit code zero).
"chown user:group /path" is 'change ownership' of /path to user:group; in this case to user "otrs" and group "www-data" (the webserver group)
"chmod xxx /path" is 'change mode' (i.e. permissions). This is a little more complicated (and you can google if you're particularly interested) but the 3 numbers refer to user:group;everybody and 7 means all privileges. So essentially it means that the user and the group have full rights to the directory.
So the full thing in English is:
Does the directory /run/otrs exist? If so great; go to the next line. If not then make it and set the owner to the user "otrs" and group "www-data" (webserver); also give them full rights...
not sure its use then, be it
not sure its use then, be it that directory is empty...
- Tony
Network Engineer
Federal Gov't
/run is for PID files and lock files usually
For the love of me, i cannot
For the love of me, i cannot get this scheduler to remain running, every few hours i receive the same error. all google searches point to otrs folder paths that do not match up with this ISO. perhaps this ISO isnt as polished as i would have thought, as I am running into more and more OTRS issues as I go along, since directories that files are looking for arent in the same location(s) specified. :(
- Tony
Network Engineer
Federal Gov't
Different locations is not unexpected
Have you looked at the log files? That would be the first place to start IMO (I'd look for a file called otrs.log or similar in /var/log). The next thing to look at is the settings (probably /etc/otrs or similar). From my brief googling it seems that the scheduler should be running as a daemon so there should definitely be a log file somewhere.
I'm really snowed under with updating the optimised builds at the moment but as sopon as I have time I will sit down and have a closer look at this...
I've fired up an instance
It is also mentioned in the OTRS logs (within the Admin web interface). Also I see that there isn't a /var/log/otrs.log as I was expecting. However there are quite a few entries in the syslog which suggest that it's working how it should (I'm guessing that all these entries are OTRS checking that it's running!?); e.g.:
I'm a bout to go to bed but I'll leave it running overnight and see how it is in the morning.
my ps aux | grep otrs shows
my ps aux | grep otrs shows the following
I noticed my otrs.Scheduler.pl has -a start (yours has -w 1)
I noticed my root line has ttyl (yours has pts/1)
Not sure if those mean anything and/or if they should be changed.
- Tony
Network Engineer
Federal Gov't
It does appear the Schedule
It does appear the Schedule is running, however, I am seeing these lines within the syslog:
It would seem as though it stops if configuration changes are made or something. It restarts when I bounce the node or after a period of idle time. Thoughts/Confirm?
- Tony
Network Engineer
Federal Gov't
Service stopped again, tried
Service stopped again, tried to manually start it, received:
It would also appear that if this isnt running, my "Fetch E-mail" cronjob doesn't run every 5 minutes; which poses an issue on my Help Desk Tickets.
This appears to be an issue here.
- Tony
Network Engineer
Federal Gov't
All week this notification is
All week this notification is listed at the top of the page:
However, when I review the system log, it appears to be runnning?
- Tony
Network Engineer
Federal Gov't
bump...
bump...
- Tony
Network Engineer
Federal Gov't
Not sure why it's whinging
From what I can see the warning can be safely ignored. Although TBH as I've said I'm not OTRS expert so I can't comment further...
The Debian 8 OS itself
The Debian 8 OS itself doesnt appear to have a cronjob for the Scheduler:
But within Webmin there is a cronjob configured for OTRS services.
This job was defaulted to run every 5 minutes, but this also appears to be overkill for its use in my Agency. I have since adjusted thist to every 15 minutes (may even up it to 30 minutes).
The way I seemed to bandaid this issue on my appliance is just to reduce the restart timer within OTRS GUI (SysConfig --> Scheduler --> Core) "Scheduler::RestartAfterSeconds" from the default of 86400 (24hrs) to 3600 (1hr); so that it auto restarts every 1hr if there are any failures/stops in between.
Thus, down time (if there is any from the warning to begin with) is cleared/reset every hour.
- Tony
Network Engineer
Federal Gov't
Great work
Re the "missing" cron job. I suspect that it is because each user has a crontab file. So by default you are probably only checking root's. WHereas the OTRS schedulaer is using the otrs user account crontab file. Although that must mean that by default Webmin collect's crontab info from all users (which would make sense but I didn't realise that it's that smart!)
Add new comment