8 Replies Latest reply: Feb 17, 2014 4:55 PM by Morgs
michaelhoch Level 1 Level 1 (5 points)

Can I delete active tasks in the profilemanager? There are over 500 of them, and it stopped pushing to the devices.

Is there a command line for batch deleting?

  • Newham Bridge Administrator Level 1 Level 1 (0 points)

    23 people at the time of writing have this question too. We need a Cancel All button in the next version of Profile Manager.

    Either that or we need Profile Manager to do its job and actually push to profiles that it's supposed to!

  • Tearjerker Level 1 Level 1 (45 points)

    1. Launch the Terminal on the PM Server.  You’ll find it in the Utilities folder under Applications.

    2. Copy and paste in the following command.  This command accesses the database that Profile Manager stores all of its data in and erases all of the tasks.

    sudo psql -h "/Library/Server/PostgreSQL For Server Services/Socket" -U _postgres -d device_management -c "TRUNCATE TABLE tasks;"

    3. You will be asked for your password.  Type it in and press enter.

  • Geuzencollege Level 1 Level 1 (0 points)

    When i use your command:

    sudo psql -U _devicemgr -d devicemgr_v2m0 -h /Library/Server/ProfileManager/Config/var/PostgreSQL -c "DELETE FROM library_item_tasks WHERE completed_at IS NOT NULL"

     

    It says:

    psql: could not connect to server: No such file or directory

        Is the server running locally and accepting

        connections on Unix domain socket "/Library/Server/PostgreSQL For Server Services/Socket/.s.PGSQL.5432"?

     

    When i use this command:

    sudo psql -U _devicemgr -d devicemgr_v2m0 -h /Library/Server/ProfileManager/Config/var/PostgreSQL -c "DELETE FROM library_item_tasks WHERE completed_at IS NOT NULL"

     

    It says:

    DELETE 0

     

    Now when i go to Profile Manager there are still 200 active tasks running...

    What i do wrong ?

  • Tearjerker Level 1 Level 1 (45 points)

    sudo psql -h "/Library/Server/PostgreSQL For Server Services/Socket" -U _postgres -d device_management -c "TRUNCATE TABLE tasks;"

     

     

    Your commands were wrong....

     

    Best

  • Geuzencollege Level 1 Level 1 (0 points)

    Hi Taerjerker,

    Maybe u can explain me what i am doing wrong ?

     

    This command works for me:

    sudo psql -U _devicemgr -d devicemgr_v2m0 -h /Library/Server/ProfileManager/Config/var/PostgreSQL -c "DELETE FROM library_item_tasks WHERE completed_at IS NOT NULL"

     

    But i still see the active tasks in Profile Manager...

  • Tearjerker Level 1 Level 1 (45 points)

    Hi!

     

    Please try this command:

     

    sudo psql -h "/Library/Server/PostgreSQL For Server Services/Socket" -U _postgres -d device_management -c "TRUNCATE TABLE tasks;"

     

    It works great for me...

     

    Best

  • Geuzencollege Level 1 Level 1 (0 points)

    Hi Tearjerker,

     

    Thank you for your fast reply.

     

    When i use your command it gives the following message:

     

    psql: could not connect to server: No such file or directory

        Is the server running locally and accepting

        connections on Unix domain socket "/Library/Server/PostgreSQL For Server Services/Socket/.s.PGSQL.5432"?

     

    ( sorry, i copy paste it wrong in my first message, i have try this command before ).

  • Morgs Level 1 Level 1 (10 points)

    Hello All,

     

    Is someone able to explain what is going on when you do this?

     

    Is it wise?

    Should any actions post be taken?

     

    Thanks

    Morgs