Running/Testing a cronjob from DA

BBM

Verified User
Joined
Jun 8, 2013
Messages
416
Location
Dutch Mountains
In addition to the Add, Edit, Delete and Save possibilities of cronjobs, I think it would be nice to see a "RUN/TEST"-button on the cronjob-page as well.
 
Hello,

And what RUN/TEST should do?

If you want to test/run a new or any existing crontask you can set * * * * * for a task. Any other method might be not as reliable as you want, because the environment of a cron-task might differ.
 
One of the most common issues with crontab is that it has it's own environment, i.e. PATH= value, which might differ from user's environment in a console.

If directadmin can simulate environment of crontab, then why not to have it?! Feel free to bring the feature request to Directadmin staff's attention then.
 
In my case I have a simple script that gets called by a cronjob once a day.
Lately this script didn't work as expected anymore, like again this morning too.
I made a number of changes through FTP in the script and wanted to run the cronjob again through DA, only to find the option wasn't there.
I think to remember many, many years ago I have used this function, but it must have been with cPanel perhaps?

Now I had to login with SSH to just copy and paste the cronjob's content into the terminal screen and see what happens. Feels a bit clumsy for something that could've been handled by DA itself easily imo.
 
Never seen such a button in Directadmin. Tasks can be executed with cron as simple as


Code:
* * * * * /path/to/script.sh >> ~/crontask.out 2>&1

then just check content of ~/crontask.out either in directadmin filemanager or via FTP.

This is how I do it.
 
Back
Top