IBM Notes Scheduled agent does not execute - lotus-notes

I wrote an agent that runs every 1:00 AM daily, but fails to execute the routine mysteriously. I've checked the agent log and saw that it ran and ends without any error. What I've been thinking about is when I trigger the agent or ran it manually it executes the routine I coded successfully and not when it is scheduled. I really don't know what's the issue there, thanks for help in advance.

there are a few things to try
Check the trigger property on the agent and set it to run on All documents or change it to None. Test both scenarios. There are some issues with this setting.
When you run an agent manually from the notes client or designer you are running it using the credentials from you id file. When running it scheduled you use the credentials from the server.
Make sure your server have enough access to perform what your script does. There is also a setting in the agent for increasing what the script is allowed to perform.
If you have access to the server console you can trigger the agent to run on server using the command: tell amgr run "database.nsf" 'agentname'

Related

Django custom management commands as windows scheduled task

I'm trying to run a Django2.1 custom management command from within a python3 virtual environment on a windows server with the task scheduler. The command I've tried work as follows:
C:\Users\dev\Programs\Python3\Scripts\python.exe C:\Users\dev\Programs\Python3\Scripts\access-api\my_project\manage.py accessapi
The script runs just fine if I also execute it as a .bat file but when I try to create a scheduled task and run the .bat script, the task scheduler fails or says it completed but the data that I'm looking to update, doesn't get updated. I managed to find this reddit post about this same issue but it doesn't seem to work as described.
The script itself isn't a pretty one but it works using pyodbc drivers to run queries in from an Access 2010 database and convert to it JSON, then update required records using Django's API in a PostgreSQL database.
"Actions" Tab in task property use your commands to configure as:
Program script field:
C:\Python36\python.exe
Add Argumenrs(optional) field:
"C:\Users\dev\Programs\Python3\Scripts\access-api\my_project\manage.py" accessapi

Notes cannot create automation object

I have created an agent iin which I call a dll file so that I can get data from another system eventually..
When I manually run this agent then the call to the dll file works and I get data from it.
When I call this agent from a browser then I get:
Error Description : Cannot create automation object
The security of the agent is on 3.Allow restricted operations with full administration rights.
Any idea why I get Cannot create automation object when running agent from browser?
When you start the agent from browser then the agent runs on Domino server.
So, you need to install automation object's software on this server.
When you manually run the agent then the code is executed on your client. This works because you installed the software necessary for creating the automation object on your client.
I found the same error but in my case everything was working properly until we restored a backup of Windows. The issue was caused because Office had to be reactivated again.
Sometimes this happens too because a corruption of the Word document, so you have to rebuild it.
I hope this could be helpful in future to other people

Reset CRON Job - Template + WAMP

I've downloaded a template of an ADs site and I'm testing it on localhost with WAMP Server.
The problem is that the listings are not expiring after the end of their lifetime days.
I contacted the owner of the template and he said to reset the CRON job of my environment.
But I don't know how to do it.
Can anyone help me?
If you are using WAMP you are running on Windows.
If you are running on Windows you dont have access to cron as there is no cron on Windows.
So the reason you are not getting listings expired is that the jobs designed to do the expiration are not running.
You will either have to run it on a UNIX system or work out what jobs should be run and set them uninmf PHP CLI and then create tasks to run them using Windows Task Sceduler.

Automatically Restarting Website after IIS AppPool recyle

I'm using a website which interacts with SQL Server Agent in order to schedule the automatic processing and emailing of reports. I recently noticed that when the AppPool recyles, that i'm not getting reports afterwards - until someone logs into the website again. It's possible for the website not to get hit for hours/days, during which all the scheduled tasks are lost.
I'd like to set up a windows task to either run periodically or trigger off the AppPool recycle event. But I'm not sure what the task should be. I had one suggestion to set up a Windows task to exercise a .js script that would hit the website, but this only works with Windows Authentication (which isn't being used):
var xmlhttp = new ActiveXObject("MSXML2.XMLHTTP");
xmlhttp.open("POST", "http://localhost/website/default.aspx", false);
xmlhttp.send();
Looking for some suggestions on how to "wake up" a website after an IIS AppPool recycle.
Thanks.
ab.
Why not run gnu wget from a scheduled task:
wget -O - http://mysite.com/default.aspx
I ran across this today which seems like it might help you out. It's the IIS Warm-up module. Depends on whether you can convince the your customer to install it, although it is an official IIS module, so hopefully it's no problem.

SPJobDefinition.Execute running but not showing it ran in Central Admin

I'm using SPJobDefinition.Execute to explicitly force a timer job to run for a bit of testing. The job runs but the time it last ran hasn't changed in either 'Timer job status' or 'Timer job definitions'. As this hasn't run before, forcing it doesn't even appear in 'Timer job status'. I recall that it did update the last run time inside central admin when I last tried this. So either something is broken and it's not updating the status, or it doesn't update the status by design and I'm mistaken about it doing so last time.
I've discovered that OWSTIMER.exe doesn't end up doing the execution. I wrote a console app which did the call to SPJobDefinition.Execute and it turns out that Execute doesn't schedule it to run there and then, but actually loads up the dll for the job and runs it in process. I would imagine that a side effect of this is that it doesn't run under schedule and so Central Admin doesn't show that it ran.
I had similar problem, the solution was to restart the 'SharePoint 2010 Timer' service (to reload the job DLL).

Resources