Results 1 to 7 of 7

Thread: Running/Testing a cronjob from DA

  1. #1
    Join Date
    Jun 2013
    Location
    Dutch Mountains
    Posts
    273

    Running/Testing a cronjob from DA

    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.

  2. #2
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    11,947
    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.

  3. #3
    Join Date
    Sep 2008
    Location
    London UK
    Posts
    1,595
    Webmin has a "Run Cron Job", so not sure why DA couldn't...

  4. #4
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    11,947
    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.

  5. #5
    Join Date
    Nov 2016
    Posts
    39
    Good idea, Also hope to see in next version of DA.

  6. #6
    Join Date
    Jun 2013
    Location
    Dutch Mountains
    Posts
    273
    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.

  7. #7
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    11,947
    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •